Internal_Datalogger but with USB support removed (for MAX40108 Demo board), proof of concept that MAX32625 can be used successfully with VDDB(USB) left unpowered, as long as the USB library is not used.
Dependencies: max32625pico CmdLine
Diff: DataLogger_Internal.cpp
- Revision:
- 61:52456e705fa8
- Parent:
- 60:129bc521f88c
- Child:
- 62:a618b70c4f22
--- a/DataLogger_Internal.cpp Tue Apr 26 01:57:08 2022 -0700 +++ b/DataLogger_Internal.cpp Wed May 11 16:31:40 2022 -0700 @@ -9550,6 +9550,22 @@ // omit units from datalog numbers, confuses ms-excel #275 // cmdLine.serial().printf("%s", Platform_MathUnitString[Datalogger_action_table[i].condition_channel]); } + if (Platform_Enable_ch[Datalogger_action_table[i].condition_channel] == Platform_AIN_Enable_Math_Volt) { + // Perform calculations based on Platform_Voltage[Datalogger_action_table[i].condition_channel] + // apply offset Platform_MathOffsetA[] + // apply gain Platform_MathGainMulA[] + // apply 1/gain Platform_MathGainDivA[] + // display unit string Platform_MathUnitString[] + Platform_Voltage_test = (Platform_Voltage[Datalogger_action_table[i].condition_channel] - Platform_MathOffsetA[Datalogger_action_table[i].condition_channel]); + Platform_Voltage_test = Platform_Voltage_test * Platform_MathGainMulA[Datalogger_action_table[i].condition_channel]; + if (Platform_MathGainDivA[Datalogger_action_table[i].condition_channel] != 0) { + Platform_Voltage_test = Platform_Voltage_test / Platform_MathGainDivA[Datalogger_action_table[i].condition_channel]; + } + // + // cmdLine.serial().printf("%6.6f", Platform_Voltage_test); + // omit units from datalog numbers, confuses ms-excel #275 + // cmdLine.serial().printf("%s", Platform_MathUnitString[Datalogger_action_table[i].condition_channel]); + } #endif // PLATFORM_AIN_MATH switch(Datalogger_action_table[i].condition) {