* ProtoView first tests

* Imp

* fix, reset
This commit is contained in:
Totoo
2024-07-29 07:45:56 +02:00
committed by GitHub
parent 96a60e82bc
commit 9211975868
17 changed files with 669 additions and 7 deletions

View File

@@ -124,6 +124,7 @@ class Message {
AudioBeep = 66,
PocsagTosend = 67,
BatteryStateData = 68,
ProtoViewData = 69,
MAX
};
@@ -1426,4 +1427,13 @@ class BatteryStateMessage : public Message {
uint16_t voltage = 0; // mV
};
class ProtoViewDataMessage : public Message {
public:
constexpr ProtoViewDataMessage()
: Message{ID::ProtoViewData} {}
int32_t times[100] = {0}; // positive: high, negative: low
uint16_t timeptr = 0;
const uint16_t maxptr = 99;
};
#endif /*__MESSAGE_H__*/

View File

@@ -116,6 +116,7 @@ constexpr image_tag_t image_tag_usb_sd{'P', 'U', 'S', 'B'};
constexpr image_tag_t image_tag_weather{'P', 'W', 'T', 'H'};
constexpr image_tag_t image_tag_subghzd{'P', 'S', 'G', 'D'};
constexpr image_tag_t image_tag_protoview{'P', 'P', 'V', 'W'};
constexpr image_tag_t image_tag_noop{'P', 'N', 'O', 'P'};

View File

@@ -1,6 +1,6 @@
#include "ui_language.hpp"
const char* LanguageHelper::englishMessages[] = {"OK", "Cancel", "Error", "Modem setup", "Debug", "Log", "Done", "Start", "Stop", "Scan", "Clear", "Ready", "Data:", "Loop"};
const char* LanguageHelper::englishMessages[] = {"OK", "Cancel", "Error", "Modem setup", "Debug", "Log", "Done", "Start", "Stop", "Scan", "Clear", "Ready", "Data:", "Loop", "Reset"};
const char** LanguageHelper::currentMessages = englishMessages;

View File

@@ -19,7 +19,8 @@ enum LangConsts {
LANG_CLEAR,
LANG_READY,
LANG_DATADP,
LANG_LOOP
LANG_LOOP,
LANG_RESET
};
class LanguageHelper {

View File

@@ -2630,13 +2630,13 @@ void Waveform::paint(Painter& painter) {
const float y_scale = (float)(h - 1) / 65536.0;
int16_t* data_start = data_ + offset_;
// Clear
painter.fill_rectangle_unrolled8(screen_rect(), Theme::getInstance()->bg_darkest->background);
if (!length_) return;
x_inc = (float)screen_rect().size().width() / length_;
// Clear
painter.fill_rectangle_unrolled8(screen_rect(), Theme::getInstance()->bg_darkest->background);
if (digital_) {
// Digital waveform: each value is an horizontal line
x = 0;