Skip to content
Snippets Groups Projects
Commit c983de9d authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

APM_OBC: changed termination servo values, and added loop counter

parent 9ffeecdf
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ static void set_servos_terminate(uint8_t obc_mode) ...@@ -121,7 +121,7 @@ static void set_servos_terminate(uint8_t obc_mode)
{ {
set_mux_mode(MUX_MODE_MICRO); set_mux_mode(MUX_MODE_MICRO);
if (obc_mode) { if (obc_mode) {
set_servos(2000, 2000, 1000, 2000); set_servos(1000, 2000, 1000, 1000);
} else { } else {
set_servos(1500, 1500, 1200, 1500); set_servos(1500, 1500, 1200, 1500);
} }
...@@ -161,6 +161,9 @@ void loop() ...@@ -161,6 +161,9 @@ void loop()
static uint8_t led_state; static uint8_t led_state;
static bool has_terminated = false; static bool has_terminated = false;
static uint8_t termination_counter; static uint8_t termination_counter;
static uint16_t loop_counter;
loop_counter++;
// check for heartbeat // check for heartbeat
update_heartbeat(); update_heartbeat();
...@@ -188,8 +191,10 @@ void loop() ...@@ -188,8 +191,10 @@ void loop()
Serial.print(" TERM1:"); Serial.print(terminate_primary); Serial.print(" TERM1:"); Serial.print(terminate_primary);
Serial.print(" TERM2:"); Serial.print(terminate_backup); Serial.print(" TERM2:"); Serial.print(terminate_backup);
Serial.print(" TERMINATED:"); Serial.print(has_terminated); Serial.print(" TERMINATED:"); Serial.print(has_terminated);
Serial.print(" LOOP:"); Serial.print(loop_counter);
Serial.println(); Serial.println();
delayMicroseconds(5000); delayMicroseconds(5000);
loop_counter = 0;
// flash LED once a second so we know failsafe board // flash LED once a second so we know failsafe board
// is working // is working
led_state = !led_state; led_state = !led_state;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment