Index: firmware/App/Drivers/ConductivityTeensy.c =================================================================== diff -u -rd305a91c82fe89a76d9accbb8faa3d81e3106341 -r11dbd4210f75d1587be89117e60409cf1b4d1085 --- firmware/App/Drivers/ConductivityTeensy.c (.../ConductivityTeensy.c) (revision d305a91c82fe89a76d9accbb8faa3d81e3106341) +++ firmware/App/Drivers/ConductivityTeensy.c (.../ConductivityTeensy.c) (revision 11dbd4210f75d1587be89117e60409cf1b4d1085) @@ -77,15 +77,14 @@ static U08 queueRearIndex; ///< Queue rear index. static U08 queueFrontIndex; ///< Queue front index. static TEENSY_CMD_INDEX_T currentCmd; -static CONDUCTIVITY_MST_PARAM_IDX_T currentSettingParam = CONDUCTIVITY_MST_PARAM_IDX_SINFREQ; // Conductivity DMA control records static g_dmaCTRL condDMAWriteControlRecord; ///< DMA record for controlling a DMA write command transmission from buffer. static g_dmaCTRL condDMAWriteRespControlRecord; ///< DMA record for controlling a DMA write command reception to buffer. static CONDUCTIVITY_INIT_STATUS_T conductivityInitStatus; static CONDUCTIVITY_UPDATE_EEPROM_STATUS_T condUpdateEEPROMstatus; -static CONDUCTIVITY_UPDATE_MST_STATUS_T condUpdateSettingStatus[MAX_CONDUCTIVITY_MST_PARAM_IDX]; +static CONDUCTIVITY_UPDATE_MST_STATUS_T condUpdateSettingStatus[MAX_COND_MST_PARAM_IDX]; static CONDUCTIVITY_SENSOR_DATA_T rawConductivityValues[ MAX_TEENSY_SENSOR ]; static CONDUCTIVITY_CALCULATED_MEASUREMENTS_T calculatedMeasurement[ MAX_TEENSY_SENSOR ]; static CONDUCTIVITY_COEFFICIENTS_T conductivityCoeff[MAX_TEENSY_SENSOR]; @@ -105,16 +104,6 @@ { TEENSY_CMD_GET_SINGLE_MEASUREMENT , (U08*)"h" , RX_SIZE_GET_SINGLE_MEASUREMENT }, }; -static const U08* condSettingsParam = { - "sinfreq", - "dacpp", - "bias", - "rtia", - "pga", - "dftnum", - "avgnum", - }; - // Conductivity cmd data structs TEENSY_SENSOR_INDEX_T currentSelectedSensor; CONDUCTIVITY_EEPROM_DATA_T eePromDataTX; @@ -735,6 +724,9 @@ if ( written > 0 ) { + // Clear the DMA write comand buffer + memcpy( &condWriteCmdBuffer, 0, COND_WRITE_CMD_BUFFER_LEN ); + // Load the DMA write command buffer with contents of TX buffer. memcpy( &condWriteCmdBuffer, &condTxBuffer, written ); success = TRUE; condWriteCommandInProgress = TRUE;