- add storage for ringtone

- Refactor file load and save
- fix a size error in Canned Messages
This commit is contained in:
Thomas Göttgens
2022-12-29 16:53:36 +01:00
parent 1a949b7ca6
commit 3c5710e65b
5 changed files with 81 additions and 12 deletions

View File

@@ -28,7 +28,8 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency:
void stopNow();
char pwmRingtone[Constants_DATA_PAYLOAD_LEN] = "a:d=8,o=5,b=125:4d#6,a#,2d#6,16p,g#,4a#,4d#.,p,16g,16a#,d#6,a#,f6,2d#6,16p,c#.6,16c6,16a#,g#.,2a#";
void handleGetRingtone(const MeshPacket &req, AdminMessage *response);
void handleSetRingtone(const char *from_msg);
protected:
/** Called to handle a particular incoming message
@@ -37,6 +38,8 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency:
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
virtual int32_t runOnce() override;
virtual AdminMessageHandleResult handleAdminMessageForModule(const MeshPacket &mp, AdminMessage *request, AdminMessage *response) override;
};
extern ExternalNotificationModule *externalNotificationModule;