Skip to content

Commit 66dec62

Browse files
modules: trigger: send TRIGGER_FOTA_POLL
Fix fota, currently not receiving TRIGGER_FOTA_POLL. Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
1 parent 00deb49 commit 66dec62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/modules/trigger/trigger.c

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static void trigger_send(void)
6969
struct battery_msg battery_msg = {
7070
.type = BATTERY_PERCENTAGE_SAMPLE_REQUEST,
7171
};
72+
enum trigger_type fota_trigger = TRIGGER_FOTA_POLL;
7273

7374
err = zbus_chan_pub(&NETWORK_CHAN, &network_msg, K_SECONDS(1));
7475
if (err) {
@@ -83,6 +84,14 @@ static void trigger_send(void)
8384
SEND_FATAL_ERROR();
8485
return;
8586
}
87+
88+
/* Send FOTA poll trigger */
89+
err = zbus_chan_pub(&TRIGGER_CHAN, &fota_trigger, K_SECONDS(1));
90+
if (err) {
91+
LOG_ERR("zbus_chan_pub FOTA trigger, error: %d", err);
92+
SEND_FATAL_ERROR();
93+
return;
94+
}
8695
}
8796

8897
/* Delayed work used to send triggers to the rest of the system */

0 commit comments

Comments
 (0)