From 2dd0f589db41fb53992e6c1ad4fb06e7799162c3 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Tue, 8 Aug 2017 11:27:15 -0700 Subject: [PATCH] Inline TestConfig --- right/src/usb_protocol_handler.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index cbbce18..9645572 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -83,21 +83,15 @@ void readMergeSensor(void) SetResponseByte(MERGE_SENSOR_IS_MERGED); } -// TODO: Expose this as a separate USB command and make Agent call it and check its output before calling applyConfig. -void TestConfig(void) +void applyConfig(void) { + uint8_t *temp; + ParserRunDry = true; StagingUserConfigBuffer.offset = 0; GenericHidOutBuffer[0] = ParseConfig(&StagingUserConfigBuffer); GenericHidOutBuffer[1] = StagingUserConfigBuffer.offset; GenericHidOutBuffer[2] = StagingUserConfigBuffer.offset >> 8; -} - -void applyConfig(void) -{ - uint8_t *temp; - - TestConfig(); // This line will be removed. TestConfig will be called by Agent separately. ParserRunDry = false; temp = UserConfigBuffer.buffer; UserConfigBuffer.buffer = StagingUserConfigBuffer.buffer;