allow observers to return an error code to abort further processing

Will allow me to use observers to generalize the various hooks
that need to run to preflight sleep entry.
This commit is contained in:
geeksville committed 2020-04-10 12:40:44 -07:00
1 parent 6ad451eb5f
commit 640cb3bf7f
4 files changed
+22 -8

No files matched your search

+2 -1
View File
@@ -222,10 +222,11 @@ class FromNumCharacteristic : public CallbackCharacteristic, public Observer<uin
}
/// If the mesh service tells us fromNum has changed, tell the phone
virtual void onNotify(uint32_t newValue)
virtual int onNotify(uint32_t newValue)
{
setValue(newValue);
notify();
return 0;
}
};