Skip to content

Commit

Permalink
disables gpio and adds delays to help debug
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeFreer committed Jul 16, 2024
1 parent 95fa36d commit be70a84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions firmware/projects/LVController/inc/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <cmath>

#include "bindings.h"
#include "can_messages.h"
#include "shared/comms/can/can_bus.h"
#include "shared/os/mutex.h"
#include "shared/periph/gpio.h"
Expand Down Expand Up @@ -41,10 +43,14 @@ class Subsystem {
: enable_output_(enable_output) {}

inline virtual void Enable() const {
bindings::DelayMS(1000);

return; // disable gpio
enable_output_.SetHigh();
}

inline virtual void Disable() const {
return; // disable gpio
enable_output_.SetLow();
}

Expand All @@ -57,14 +63,17 @@ class Indicator {
Indicator(shared::periph::DigitalOutput& output) : output_(output) {}

inline void TurnOn() {
return; // dsiable gpio
output_.SetHigh();
}

inline void TurnOff() {
return; // dsiable gpio
output_.SetLow();
}

inline void SetState(bool value) {
return; // dsiable gpio
output_.Set(value);
}

Expand Down Expand Up @@ -137,6 +146,7 @@ class Fan : public Subsystem {
float duty_per_second_ = 0.0f;

void SetPower(float power) const {
return; // disable gpio
pwm_output_.SetDutyCycle(power_to_duty_.Evaluate(power));
}
};
Expand All @@ -151,6 +161,7 @@ class DCDC : public Subsystem {
led_(led_output){};

bool CheckValid() {
return false; // disable gpio
bool is_valid = valid_input_.Read();
led_.SetState(is_valid);
return is_valid;
Expand Down

0 comments on commit be70a84

Please sign in to comment.