mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-04 04:47:25 +00:00

This reverts commit5cc8ca59a3
. Revert "Sync Wio lr1110 refresh with master (#4251)" This reverts commitd97e6b86b8
. Revert "update SD_FLASH_SIZE to 0x27000 (#4232)" This reverts commit2df8093fef
.
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
#pragma once
|
|
#include "ProtobufModule.h"
|
|
#include "concurrency/OSThread.h"
|
|
#include "mesh/generated/meshtastic/powermon.pb.h"
|
|
|
|
/**
|
|
* A module that provides easy low-level remote access to device hardware.
|
|
*/
|
|
class PowerStressModule : public ProtobufModule<meshtastic_PowerStressMessage>, private concurrency::OSThread
|
|
{
|
|
meshtastic_PowerStressMessage currentMessage = meshtastic_PowerStressMessage_init_default;
|
|
bool isRunningCommand = false;
|
|
|
|
public:
|
|
/** Constructor
|
|
* name is for debugging output
|
|
*/
|
|
PowerStressModule();
|
|
|
|
protected:
|
|
/** Called to handle a particular incoming message
|
|
|
|
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
|
*/
|
|
virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_PowerStressMessage *p) override;
|
|
|
|
/**
|
|
* Periodically read the gpios we have been asked to WATCH, if they have changed,
|
|
* broadcast a message with the change information.
|
|
*
|
|
* The method that will be called each time our thread gets a chance to run
|
|
*
|
|
* Returns desired period for next invocation (or RUN_SAME for no change)
|
|
*/
|
|
virtual int32_t runOnce() override;
|
|
};
|
|
|
|
extern PowerStressModule powerStressModule; |