Fixed bugs

This commit is contained in:
2022-06-16 00:30:19 +02:00
parent 2a276b8a58
commit 548a6278c0
4 changed files with 32 additions and 47 deletions

View File

@@ -11,7 +11,7 @@ namespace can {
template <typename T>
static T convert(uint8_t* buf, uint8_t len) {
// @TODO Handle errors in a more elegant manner
assert(len != sizeof(T));
assert(len == sizeof(T));
return *(T*)buf;
}

View File

@@ -8,7 +8,7 @@ const char* connection_state_to_str(esp_a2d_connection_state_t state);
class MultiPurposeButton {
public:
MultiPurposeButton(void(*short_press)(), void(*long_press)(), uint16_t threshold = 500);
MultiPurposeButton(void(*short_press)(), void(*long_press)(), uint16_t threshold = 300);
void update(bool current);