diff --git a/src/boards/HeliTest/ScreenManager.cpp b/src/boards/HeliTest/ScreenManager.cpp index 5e46acb7848f441e349d7d53c3d4016171d78490..7e743db21b2aba17661995bd2ddcaaaf811882b5 100644 --- a/src/boards/HeliTest/ScreenManager.cpp +++ b/src/boards/HeliTest/ScreenManager.cpp @@ -160,7 +160,7 @@ void ScreenManager::drawRogallinaFMM() writeLine(2, 0, buffer, fgcolor, bgcolor); string pin_state; - if (pin_status.state == 1) + if (pin_status.state == 0) { bgcolor = green; fgcolor = black; diff --git a/src/boards/HeliTest/config.h b/src/boards/HeliTest/config.h index a059f69a90912e3ad6b829033561979d73ca8979..825cb47558ca59e25ae17a547a4f24d84e21d471 100644 --- a/src/boards/HeliTest/config.h +++ b/src/boards/HeliTest/config.h @@ -34,8 +34,8 @@ namespace RogallinaBoard { /* CUTTER */ static const PWMChannel CUTTER_PWM_CHANNEL = PWMChannel::CH2; -static const int CUTTER_PWM_FREQ = 150; -static const float CUTTER_PWM_DUTY = 32.f / 256; +static const int CUTTER_PWM_FREQ = 450; +static const float CUTTER_PWM_DUTY = 0.25; static const int CUTTER_PWM_DUTY_RESOLUTION = 1024; static const PWM::Timer CUTTER_TIM{ @@ -51,8 +51,8 @@ using CUTTER_CSENSE = miosix::Gpio<GPIOC_BASE, 4>; */ // Time from pin detachment to cutter activation in ms -static const unsigned int FREEFALL_TIME_MS = 500; -static const unsigned int TIMEOUT_STOP_CUTTING = 1000; +static const unsigned int FREEFALL_TIME_MS = 3*1000; +static const unsigned int TIMEOUT_STOP_CUTTING = 15*1000; static const unsigned int BRIDGE_DISCHARGE_TIME_MS = 30; @@ -61,13 +61,13 @@ static constexpr unsigned int PINOBS_POLL_INTERVAL = 20; using DETACHMENT_PIN = pin1; static const miosix::Mode::Mode_ DETACHMENT_PIN_MODE = - miosix::Mode::INPUT_PULL_DOWN; + miosix::Mode::INPUT_PULL_UP; static constexpr unsigned int DETACHMENT_PIN_PORT = pin1_port; static constexpr unsigned char DETACHMENT_PIN_NUM = pin1_num; static const PinObserver::Transition DETACHMENT_PIN_TRANSITION = - PinObserver::Transition::FALLING_EDGE; + PinObserver::Transition::RISING_EDGE; static constexpr unsigned int DETACHMENT_PIN_THRESHOLD = 3;