Update main.c APRS sim voltage and current

master-fsk-cw
Alan Johnston 2 months ago committed by GitHub
parent ad591eb81f
commit ec948bf189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1359,17 +1359,24 @@ void get_tlm(void) {
// fclose(file_append); // fclose(file_append);
// } // }
} else { // APRS } else { // APRS
/*
if (c2cStatus == 0) if (sim_mode || (failureMode != FAIL_NONE)) {
sprintf(tlm_str, "BAT %4.2f %5.1f ", batteryVoltage, batteryCurrent); if (voltage[map[BAT2]] == 0)
snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]]);
else else
sprintf(tlm_str, "BAT %4.2f %5.1f C ", batteryVoltage, batteryCurrent); snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]] + current[map[BAT2]]);
*/
snprintf(tlm_str, 30, "BAT %.2f %.1f ", batteryVoltage, batteryCurrent);
if (c2cStatus != DISABLED) if (c2cStatus != DISABLED)
strcat(tlm_str,"C "); strcat(tlm_str,"C ");
if (sim_mode || (failureMode != FAIL_NONE))
strcat(tlm_str,"S "); strcat(tlm_str,"S ");
}
else {
snprintf(tlm_str, 30, "BAT %.2f %.1f ", batteryVoltage, batteryCurrent);
if (c2cStatus != DISABLED)
strcat(tlm_str,"C ");
}
// printf("tlm_str: %s\n", tlm_str); // printf("tlm_str: %s\n", tlm_str);
strcat(str, tlm_str); strcat(str, tlm_str);
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.