Update main.c remove if !sim_mode

pi-sensors-auto
Alan Johnston 4 weeks ago committed by GitHub
parent f49d5d2735
commit 06c979f8af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -704,7 +704,8 @@ int main(int argc, char * argv[]) {
printf("Simulated Payload Failure.\n");
}
if (!sim_mode) {
//// if (!sim_mode) {
{
if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) // only process if valid payload response
{
// printf("Valid Payload!\n");
@ -758,11 +759,12 @@ int main(int argc, char * argv[]) {
}
if (sim_mode && (failureMode != FAIL_PAYLOAD) && !payload) {
printf("Generating simulated payload telemetry\n");
if (atmosphere == 0) {
sensor[PRES] = 0;
strcpy(sensor_string[PRES], "0.0");
sensor[ALT] = 400;
strcpy(sensor_string[ALT], "400");
strcpy(sensor_string[ALT], "30000");
sensor[HUMI] = 0;
strcpy(sensor_string[HUMI], "0.0");
sensor[TEMP] = 0;

Loading…
Cancel
Save

Powered by TurnKey Linux.