33 lines
787 B
C++
33 lines
787 B
C++
#pragma once
|
|
|
|
#include "Str.h"
|
|
|
|
#include <lvgl.h>
|
|
#include <tt_hal_radio.h>
|
|
|
|
template <typename Iterator>
|
|
Iterator next(Iterator i) {
|
|
return i++;
|
|
}
|
|
|
|
template <typename Iterator, typename Container>
|
|
bool is_last(Iterator i, const Container& c) {
|
|
return (i != c.end()) && (next(i) == c.end());
|
|
}
|
|
|
|
void crash(const char* const message);
|
|
void crashassert(bool assertion, const char* const message);
|
|
|
|
void hexdump(Str& out, const uint8_t* data, size_t size);
|
|
bool isPrintable(const uint8_t* data, size_t size);
|
|
|
|
char *const toString(Modulation m);
|
|
char *const toString(RadioParameter p);
|
|
char *const toString(RadioTxState state);
|
|
|
|
// Debug function which colors all children randomly
|
|
// TODO: Remove before flight
|
|
void clownvomit(lv_obj_t *obj);
|
|
|
|
void make_scrollable(lv_obj_t* obj);
|