Fix formatting
parent
1c565ddc02
commit
dc3d8941f7
18
src/main.cpp
18
src/main.cpp
|
|
@ -171,15 +171,15 @@ void ReportCommandAccepted(const mp::RequestMsg &rq, mp::ResponseMsgParamCodes s
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportFINDA(const mp::RequestMsg &rq) {
|
void ReportFINDA(const mp::RequestMsg &rq) {
|
||||||
#ifdef DEBUG_FINDA
|
#ifdef DEBUG_FINDA
|
||||||
using namespace hal;
|
using namespace hal;
|
||||||
hu::usart1.puts("FINDA:");
|
hu::usart1.puts("FINDA:");
|
||||||
if (hal::gpio::ReadPin(FINDA_PIN) == hal::gpio::Level::high) {
|
if (hal::gpio::ReadPin(FINDA_PIN) == hal::gpio::Level::high) {
|
||||||
hu::usart1.puts(" TIRGGERED\n");
|
hu::usart1.puts(" TIRGGERED\n");
|
||||||
} else {
|
} else {
|
||||||
hu::usart1.puts(" NOT TRIGGERED\n");
|
hu::usart1.puts(" NOT TRIGGERED\n");
|
||||||
}
|
}
|
||||||
#endif //DEBUG_FINDA
|
#endif //DEBUG_FINDA
|
||||||
uint8_t rsp[maxMsgLen];
|
uint8_t rsp[maxMsgLen];
|
||||||
uint8_t len = protocol.EncodeResponseReadFINDA(rq, mf::finda.Pressed(), rsp);
|
uint8_t len = protocol.EncodeResponseReadFINDA(rq, mf::finda.Pressed(), rsp);
|
||||||
WriteToUSART(rsp, len);
|
WriteToUSART(rsp, len);
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ static constexpr hal::gpio::GPIO_pin IDLER_CS_PIN = { GPIOB, 7 };
|
||||||
static constexpr hal::gpio::GPIO_pin IDLER_SG_PIN = { GPIOF, 0 };
|
static constexpr hal::gpio::GPIO_pin IDLER_SG_PIN = { GPIOF, 0 };
|
||||||
static constexpr hal::gpio::GPIO_pin IDLER_STEP_PIN = { GPIOD, 6 };
|
static constexpr hal::gpio::GPIO_pin IDLER_STEP_PIN = { GPIOD, 6 };
|
||||||
|
|
||||||
static constexpr hal::gpio::GPIO_pin FINDA_PIN = { GPIOF, 6 }; /// PF6 A1 ADC6/TDI
|
static constexpr hal::gpio::GPIO_pin FINDA_PIN = { GPIOF, 6 }; /// PF6 A1 ADC6/TDI
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue