добавлена бета проверка драйверов
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
#pragma once
|
||||
#include "Buttons.h"
|
||||
#include "Display.h"
|
||||
#include "DriverTest.h"
|
||||
#include "Measurement.h"
|
||||
#include "Pwm.h"
|
||||
#include "Radio.h"
|
||||
#include "SettingsStore.h"
|
||||
|
||||
enum class AppState : uint8_t {
|
||||
IDLE, MENU, SOLO_MEASURE, MASTER_DISCOVER, MASTER_WAIT_READY,
|
||||
IDLE, MENU, SOLO_MEASURE, SOLO_DRIVER, MASTER_DISCOVER, MASTER_WAIT_READY,
|
||||
MASTER_WAIT_RESULT, MASTER_FINALIZE, SLAVE_READY, SLAVE_WAIT_START, SLAVE_MEASURE,
|
||||
SLAVE_WAIT_ACK, FINISHED
|
||||
};
|
||||
@@ -22,11 +23,13 @@ class App {
|
||||
void finishInitialization(bool factoryReset);
|
||||
void showMenu();
|
||||
void changeMenu(int direction);
|
||||
void cycleRunMode();
|
||||
void sanitizeRange();
|
||||
void startTest();
|
||||
bool armSlave(bool preserveDisplay = false);
|
||||
bool prepareStage(bool showProgress = true);
|
||||
bool startLocalMeasurement(float hz, float duty);
|
||||
bool startDriverMeasurement();
|
||||
void startMasterDiscovery();
|
||||
void handleRadio();
|
||||
void updateMaster();
|
||||
@@ -38,6 +41,7 @@ class App {
|
||||
void printConfiguration();
|
||||
void printStageStats(const StageStats &s, uint32_t hz);
|
||||
void showStageResult(const StageStats &s);
|
||||
void showDriverResult(const DriverStats &s, bool testPassed = false);
|
||||
void showRemoteResult(const ProtocolPacket &packet);
|
||||
void fillMeasuredResult(ProtocolPacket &packet, const StageStats &stats) const;
|
||||
void showStageProgress();
|
||||
@@ -49,8 +53,15 @@ class App {
|
||||
bool packetForCurrent(const ProtocolPacket &p) const;
|
||||
void serviceIdlePowerSave();
|
||||
void serviceRxPinStateLog();
|
||||
void serviceSerialConsole();
|
||||
void handleSerialCommand(char *line);
|
||||
void printSerialHelp();
|
||||
void printSerialStatus();
|
||||
bool serialSettingsMutable() const;
|
||||
void finishSerialSettingsChange();
|
||||
void leaveIdlePowerSave(bool wakeDisplay = true);
|
||||
bool idlePowerSaveAllowed() const;
|
||||
bool usbHostPresent() const;
|
||||
void setStandbyOpticalOutput();
|
||||
void setActivePerformance(bool active);
|
||||
|
||||
@@ -62,6 +73,7 @@ class App {
|
||||
PwmGenerator pwm_;
|
||||
PulseReceiver receiver_;
|
||||
Measurement measurement_;
|
||||
DriverTest driverTest_;
|
||||
Radio radio_;
|
||||
AppState state_ = AppState::IDLE;
|
||||
uint8_t menuItem_ = 0;
|
||||
@@ -88,4 +100,8 @@ class App {
|
||||
uint32_t lastOpticalWakeToggleMs_ = 0;
|
||||
bool opticalWakeActive_ = false;
|
||||
bool rxPinStateKnown_ = false, rxPinState_ = false;
|
||||
mutable uint32_t lastUsbHostSeenMs_ = 0;
|
||||
char serialLine_[96] = {};
|
||||
uint8_t serialLineLength_ = 0;
|
||||
bool serialLineOverflow_ = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user