user input test: Register enum with Catch

Now when REQUIRE ( a == b ) fails we see the values of a and b.
pull/221/head
Guðni Már Gilbert 2022-10-16 15:40:05 +00:00
parent 08230b9d7a
commit bfd52e3078
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,13 @@
#include "../hal/adc.h"
#include "user_input.h"
CATCH_REGISTER_ENUM(mui::Event,
mui::Event::NoEvent,
mui::Event::Left,
mui::Event::Middle,
mui::Event::Right,
mui::Event::FromPrinter)
void PressButtonAndDebounce(uint8_t btnIndex) {
hal::adc::SetADC(config::buttonsADCIndex, config::buttonADCLimits[btnIndex][0] + 1);
while (!mb::buttons.ButtonPressed(btnIndex)) {