removed more

bananapi
alanbjohnston 4 years ago committed by GitHub
parent 70901ab718
commit 0f203884c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -258,13 +258,13 @@ int main(int argc, char * argv[]) {
} }
} }
} }
pinMode(txLed, OUTPUT); // pinMode(txLed, OUTPUT);
digitalWrite(txLed, txLedOff); // digitalWrite(txLed, txLedOff);
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING
printf("Tx LED Off\n"); printf("Tx LED Off\n");
#endif #endif
pinMode(onLed, OUTPUT); // pinMode(onLed, OUTPUT);
digitalWrite(onLed, onLedOn); // digitalWrite(onLed, onLedOn);
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING
printf("Power LED On\n"); printf("Power LED On\n");
#endif #endif
@ -748,17 +748,17 @@ int main(int argc, char * argv[]) {
if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power. if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power.
{ {
fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage); fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage);
digitalWrite(txLed, txLedOff); // digitalWrite(txLed, txLedOff);
digitalWrite(onLed, onLedOff); // digitalWrite(onLed, onLedOff);
sleep(1); sleep(1);
digitalWrite(onLed, onLedOn); // digitalWrite(onLed, onLedOn);
sleep(1); sleep(1);
digitalWrite(onLed, onLedOff); // digitalWrite(onLed, onLedOff);
sleep(1); sleep(1);
digitalWrite(onLed, onLedOn); // digitalWrite(onLed, onLedOn);
sleep(1); sleep(1);
digitalWrite(onLed, onLedOff); // digitalWrite(onLed, onLedOff);
FILE * file6 = popen("/home/pi/CubeSatSim/log > shutdown_log.txt", "r"); FILE * file6 = popen("/home/pi/CubeSatSim/log > shutdown_log.txt", "r");
pclose(file6); pclose(file6);

Loading…
Cancel
Save

Powered by TurnKey Linux.