mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-30 14:40:40 +00:00
more cppcheck warnings fixes
This commit is contained in:
@@ -17,7 +17,7 @@ class AdminPlugin : public ProtobufPlugin<AdminMessage>
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *p);
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *p) override;
|
||||
|
||||
private:
|
||||
void handleSetOwner(const User &o);
|
||||
@@ -28,4 +28,4 @@ class AdminPlugin : public ProtobufPlugin<AdminMessage>
|
||||
void handleGetRadio(const MeshPacket &req);
|
||||
};
|
||||
|
||||
extern AdminPlugin *adminPlugin;
|
||||
extern AdminPlugin *adminPlugin;
|
||||
|
||||
@@ -40,7 +40,7 @@ class CannedMessagePlugin :
|
||||
|
||||
protected:
|
||||
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
|
||||
void sendText(
|
||||
NodeNum dest,
|
||||
@@ -52,10 +52,10 @@ class CannedMessagePlugin :
|
||||
int getPrevIndex();
|
||||
|
||||
int handleInputEvent(const InputEvent *event);
|
||||
virtual bool wantUIFrame() { return this->shouldDraw(); }
|
||||
virtual Observable<const UIFrameEvent *>* getUIFrameObservable() { return this; }
|
||||
virtual bool wantUIFrame() override { return this->shouldDraw(); }
|
||||
virtual Observable<const UIFrameEvent *>* getUIFrameObservable() override { return this; }
|
||||
virtual void drawFrame(
|
||||
OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
||||
|
||||
int currentMessageIndex = -1;
|
||||
cannedMessagePluginRunState runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
||||
|
||||
@@ -18,15 +18,15 @@ class EnvironmentalMeasurementPlugin : private concurrency::OSThread, public Pro
|
||||
{
|
||||
lastMeasurementPacket = nullptr;
|
||||
}
|
||||
virtual bool wantUIFrame();
|
||||
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
virtual bool wantUIFrame() override;
|
||||
virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;
|
||||
|
||||
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 MeshPacket &mp, EnvironmentalMeasurement *p);
|
||||
virtual int32_t runOnce();
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, EnvironmentalMeasurement *p) override;
|
||||
virtual int32_t runOnce() override;
|
||||
/**
|
||||
* Send our EnvironmentalMeasurement into the mesh
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ class ExternalNotificationPlugin : public SinglePortPlugin, private concurrency:
|
||||
|
||||
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp);
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
||||
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
@@ -26,14 +26,14 @@ class NodeInfoPlugin : public ProtobufPlugin<User>, private concurrency::OSThrea
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, User *p);
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, User *p) override;
|
||||
|
||||
/** Messages can be received that have the want_response bit set. If set, this callback will be invoked
|
||||
* so that subclasses can (optionally) send a response back to the original sender. */
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/** Does our periodic broadcast */
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern NodeInfoPlugin *nodeInfoPlugin;
|
||||
extern NodeInfoPlugin *nodeInfoPlugin;
|
||||
|
||||
@@ -37,14 +37,14 @@ class PositionPlugin : public ProtobufPlugin<Position>, private concurrency::OST
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, Position *p);
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, Position *p) override;
|
||||
|
||||
/** Messages can be received that have the want_response bit set. If set, this callback will be invoked
|
||||
* so that subclasses can (optionally) send a response back to the original sender. */
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/** Does our periodic broadcast */
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern PositionPlugin *positionPlugin;
|
||||
extern PositionPlugin *positionPlugin;
|
||||
|
||||
@@ -27,7 +27,7 @@ class RemoteHardwarePlugin : public ProtobufPlugin<HardwareMessage>, private con
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, HardwareMessage *p);
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, HardwareMessage *p) override;
|
||||
|
||||
/**
|
||||
* Periodically read the gpios we have been asked to WATCH, if they have changed,
|
||||
@@ -37,7 +37,7 @@ class RemoteHardwarePlugin : public ProtobufPlugin<HardwareMessage>, private con
|
||||
*
|
||||
* Returns desired period for next invocation (or RUN_SAME for no change)
|
||||
*/
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern RemoteHardwarePlugin remoteHardwarePlugin;
|
||||
extern RemoteHardwarePlugin remoteHardwarePlugin;
|
||||
|
||||
@@ -18,5 +18,5 @@ class ReplyPlugin : public SinglePortPlugin
|
||||
/** For reply plugin we do all of our processing in the (normally optional)
|
||||
* want_replies handling
|
||||
*/
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
};
|
||||
|
||||
@@ -22,14 +22,14 @@ class RoutingPlugin : public ProtobufPlugin<Routing>
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, Routing *p);
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, Routing *p) override;
|
||||
|
||||
/** Messages can be received that have the want_response bit set. If set, this callback will be invoked
|
||||
* so that subclasses can (optionally) send a response back to the original sender. */
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/// Override wantPacket to say we want to see all packets, not just those for our port number
|
||||
virtual bool wantPacket(const MeshPacket *p) { return true; }
|
||||
virtual bool wantPacket(const MeshPacket *p) override { return true; }
|
||||
};
|
||||
|
||||
extern RoutingPlugin *routingPlugin;
|
||||
extern RoutingPlugin *routingPlugin;
|
||||
|
||||
@@ -19,7 +19,7 @@ class TextMessagePlugin : public SinglePortPlugin, public Observable<const MeshP
|
||||
|
||||
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp);
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
||||
};
|
||||
|
||||
extern TextMessagePlugin *textMessagePlugin;
|
||||
extern TextMessagePlugin *textMessagePlugin;
|
||||
|
||||
@@ -14,7 +14,7 @@ class RangeTestPlugin : private concurrency::OSThread
|
||||
RangeTestPlugin();
|
||||
|
||||
protected:
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern RangeTestPlugin *rangeTestPlugin;
|
||||
@@ -46,13 +46,13 @@ class RangeTestPluginRadio : public SinglePortPlugin
|
||||
float latLongToMeter(double lat_a, double lng_a, double lat_b, double lng_b);
|
||||
|
||||
protected:
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/** Called to handle a particular incoming message
|
||||
|
||||
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp);
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
||||
};
|
||||
|
||||
extern RangeTestPluginRadio *rangeTestPluginRadio;
|
||||
|
||||
@@ -14,7 +14,7 @@ class SerialPlugin : private concurrency::OSThread
|
||||
SerialPlugin();
|
||||
|
||||
protected:
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern SerialPlugin *serialPlugin;
|
||||
@@ -41,13 +41,13 @@ class SerialPluginRadio : public SinglePortPlugin
|
||||
void sendPayload(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);
|
||||
|
||||
protected:
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/** Called to handle a particular incoming message
|
||||
|
||||
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp);
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
||||
};
|
||||
|
||||
extern SerialPluginRadio *serialPluginRadio;
|
||||
|
||||
@@ -54,7 +54,7 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea
|
||||
*/
|
||||
void sendPayload(NodeNum dest = NODENUM_BROADCAST, uint32_t packetHistory_index = 0);
|
||||
void sendMessage(NodeNum dest, char *str);
|
||||
virtual MeshPacket *allocReply();
|
||||
virtual MeshPacket *allocReply() override;
|
||||
/*
|
||||
Override the wantPortnum method.
|
||||
*/
|
||||
@@ -70,16 +70,16 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea
|
||||
bool heartbeat = false; // No heartbeat.
|
||||
|
||||
protected:
|
||||
virtual int32_t runOnce();
|
||||
virtual int32_t runOnce() override;
|
||||
|
||||
/** Called to handle a particular incoming message
|
||||
|
||||
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for
|
||||
it
|
||||
*/
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp);
|
||||
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
||||
virtual ProcessMessage handleReceivedProtobuf(const MeshPacket &mp, StoreAndForward *p);
|
||||
|
||||
};
|
||||
|
||||
extern StoreForwardPlugin *storeForwardPlugin;
|
||||
extern StoreForwardPlugin *storeForwardPlugin;
|
||||
|
||||
Reference in New Issue
Block a user