user input test: Register enum with Catch
Now when REQUIRE ( a == b ) fails we see the values of a and b.pull/221/head
parent
08230b9d7a
commit
bfd52e3078
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue