Notify: clear all flags and events during init

This commit is contained in:
Randy Mackay 2015-02-03 06:14:44 +09:00
parent 272768bc0f
commit 0a68d4ef39
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ struct AP_Notify::notify_events_type AP_Notify::events;
// initialisation
void AP_Notify::init(bool enable_external_leds)
{
// clear all flags and events
memset(&AP_Notify::flags, 0, sizeof(AP_Notify::flags));
memset(&AP_Notify::events, 0, sizeof(AP_Notify::events));
AP_Notify::flags.external_leds = enable_external_leds;
for (int i = 0; i < CONFIG_NOTIFY_DEVICES_COUNT; i++) {