mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-14 17:36:38 +02:00
* preliminary state, compiles good not tested on hardware
* converted struct inverter_t to class Inverter * started with calculation functions (idea from Hubi/mikrocontroller.net)
This commit is contained in:
parent
d195eee498
commit
f6b75aff90
15 changed files with 214 additions and 290 deletions
|
@ -13,7 +13,8 @@
|
|||
|
||||
typedef CircularBuffer<packet_t, PACKET_BUFFER_SIZE> BufferType;
|
||||
typedef HmRadio<RF24_CE_PIN, RF24_CS_PIN, RF24_IRQ_PIN, BufferType> RadioType;
|
||||
typedef HmSystem<RadioType, BufferType, MAX_NUM_INVERTERS, float> HmSystemType;
|
||||
typedef Inverter<float> InverterType;
|
||||
typedef HmSystem<RadioType, BufferType, MAX_NUM_INVERTERS, InverterType> HmSystemType;
|
||||
|
||||
const char* const wemosPins[] = {"D3 (GPIO0)", "TX (GPIO1)", "D4 (GPIO2)", "RX (GPIO3)",
|
||||
"D2 (GPIO4)", "D1 (GPIO5)", "GPIO6", "GPIO7", "GPIO8",
|
||||
|
@ -22,6 +23,9 @@ const char* const wemosPins[] = {"D3 (GPIO0)", "TX (GPIO1)", "D4 (GPIO2)", "RX (
|
|||
const char* const pinNames[] = {"CS", "CE", "IRQ"};
|
||||
const char* const pinArgNames[] = {"pinCs", "pinCe", "pinIrq"};
|
||||
|
||||
const uint8_t dbgCmds[] = {0x01, 0x02, 0x03, 0x81, 0x82, 0x83, 0x84};
|
||||
#define DBG_CMD_LIST_LEN 7
|
||||
|
||||
class app : public Main {
|
||||
public:
|
||||
app();
|
||||
|
@ -42,7 +46,8 @@ class app : public Main {
|
|||
void showIndex(void);
|
||||
void showSetup(void);
|
||||
void showSave(void);
|
||||
void showCmdStatistics(void);
|
||||
void showErase(void);
|
||||
void showStatistics(void);
|
||||
void showHoymiles(void);
|
||||
void showLiveData(void);
|
||||
void showMqtt(void);
|
||||
|
@ -65,16 +70,15 @@ class app : public Main {
|
|||
return ret;
|
||||
}
|
||||
|
||||
uint8_t mState;
|
||||
bool mKeyPressed;
|
||||
bool mShowRebootRequest;
|
||||
|
||||
HmSystemType *mSys;
|
||||
|
||||
Ticker *mSendTicker;
|
||||
bool mFlagSend;
|
||||
|
||||
uint32_t mCmds[6];
|
||||
uint32_t mChannelStat[4];
|
||||
uint32_t mCmds[DBG_CMD_LIST_LEN+1];
|
||||
//uint32_t mChannelStat[4];
|
||||
uint32_t mRecCnt;
|
||||
|
||||
// mqtt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue