Skip to content

Commit

Permalink
add deploy LED timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-goddard committed Nov 18, 2024
1 parent ea0b765 commit 287de71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/Control Tasks/IRControlTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ void IRControlTask::begin() {

void IRControlTask::execute() {
// Deploy
if (sfr::ir::is_deploying && (millis() - sfr::ir::armed_start > constants::ir::arm_timeout)) {
set_white();
if (sfr::ir::is_deploying && (millis() - sfr::ir::deploy_start > constants::ir::deploy_led_timeout)) {
sfr::ir::is_deploying = false;
// TODO: Actuate filament

digitalWrite(GATE_PIN, HIGH);
delay(1);
digitalWrite(GATE_PIN, LOW);

set_white();
}

// Handle arming timeout
Expand Down
2 changes: 1 addition & 1 deletion src/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define IR_PIN 11
#define SD_PIN 4

#define LATCH_PIN A4
#define GATE_PIN A4
#define BUTTON_PIN 5

#define RED_LED_PIN A0
Expand Down

0 comments on commit 287de71

Please sign in to comment.