Added current factors. Various fixes for temperature monitor. Added partial implementation for can1 and can2

This commit is contained in:
Yury Shuvakin
2023-03-14 06:18:00 +03:00
parent 3f9bcbfebb
commit 418ad47c22
15 changed files with 678 additions and 137 deletions

View File

@@ -289,6 +289,9 @@ void modCommandsProcessPacket(unsigned char *data, unsigned int len) {
modCommandsGeneralConfig->heatingStartThreshold = libBufferGet_int16(data, &ind);
modCommandsGeneralConfig->heatingStopThreshold = libBufferGet_int16(data, &ind);
modCommandsGeneralConfig->floatCurrentK1 = libBufferGet_float32_auto(data,&ind);
modCommandsGeneralConfig->floatCurrentK2 = libBufferGet_float32_auto(data,&ind);
// RawSerialPtr = modCommandsGeneralConfig->displayTimeoutBatteryDead;
// RawSerial = *RawSerialPtr;
// RawSerial = RawSerial<<32;
@@ -435,6 +438,9 @@ void modCommandsProcessPacket(unsigned char *data, unsigned int len) {
libBufferAppend_int16(modCommandsSendBuffer, modCommandsToBeSendConfig->heatingStartThreshold, &ind);
libBufferAppend_int16(modCommandsSendBuffer, modCommandsToBeSendConfig->heatingStopThreshold, &ind);
libBufferAppend_float32_auto( modCommandsSendBuffer,modCommandsToBeSendConfig->floatCurrentK1 ,&ind);
libBufferAppend_float32_auto( modCommandsSendBuffer,modCommandsToBeSendConfig->floatCurrentK2 ,&ind);
modCommandsSendPacket(modCommandsSendBuffer, ind);
break;