@@ -236,16 +236,8 @@ static void state_reboot_pending_entry(void *o)
236
236
ARG_UNUSED (o );
237
237
238
238
int err ;
239
- enum fota_status fota_status = FOTA_STATUS_REBOOT_PENDING ;
240
239
struct nrf_cloud_settings_fota_job job = { .validate = NRF_CLOUD_FOTA_VALIDATE_NONE };
241
240
242
- /* Notify the rest of the system that a reboot is pending */
243
- err = zbus_chan_pub (& FOTA_STATUS_CHAN , & fota_status , K_SECONDS (1 ));
244
- if (err ) {
245
- LOG_ERR ("zbus_chan_pub, error: %d" , err );
246
- SEND_FATAL_ERROR ();
247
- }
248
-
249
241
/* Check if validation of full modem FOTA failed, if so, try again...
250
242
* This is a workaround due to modem shutdown -> reinitialization in bootloader mode fails
251
243
* quite frequently. (Needed to apply the full modem image)
@@ -322,20 +314,6 @@ static void fota_reboot(enum nrf_cloud_fota_reboot_status status)
322
314
*/
323
315
}
324
316
325
- static void status_events_notify (enum fota_status status )
326
- {
327
- int err ;
328
-
329
- enum fota_status fota_status = status ;
330
-
331
- err = zbus_chan_pub (& FOTA_STATUS_CHAN , & fota_status , K_SECONDS (1 ));
332
- if (err ) {
333
- LOG_ERR ("zbus_chan_pub, error: %d" , err );
334
- SEND_FATAL_ERROR ();
335
- return ;
336
- }
337
- }
338
-
339
317
static void fota_status (enum nrf_cloud_fota_status status , const char * const status_details )
340
318
{
341
319
int err ;
@@ -351,23 +329,15 @@ static void fota_status(enum nrf_cloud_fota_status status, const char *const sta
351
329
switch (status ) {
352
330
case NRF_CLOUD_FOTA_DOWNLOADING :
353
331
LOG_DBG ("Downloading firmware update" );
354
-
355
- status_events_notify (FOTA_STATUS_START );
356
332
return ;
357
333
case NRF_CLOUD_FOTA_FAILED :
358
334
LOG_ERR ("Firmware download failed" );
359
-
360
- status_events_notify (FOTA_STATUS_STOP );
361
335
break ;
362
336
case NRF_CLOUD_FOTA_TIMED_OUT :
363
337
LOG_ERR ("Firmware download timed out" );
364
-
365
- status_events_notify (FOTA_STATUS_STOP );
366
338
break ;
367
339
case NRF_CLOUD_FOTA_SUCCEEDED :
368
340
LOG_DBG ("Firmware update succeeded" );
369
-
370
- status_events_notify (FOTA_STATUS_STOP );
371
341
return ;
372
342
default :
373
343
LOG_ERR ("Unknown FOTA status: %d" , status );
0 commit comments