Skip to content

Commit 4222f9d

Browse files
committed
Subscribe to topic notify-next
1 parent d628228 commit 4222f9d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,19 @@ static void prvOTADemoTask( void * pvParam )
13921392
vTaskDelay( pdMS_TO_TICKS( 100 ) );
13931393
}
13941394

1395+
// Subscribe to notify-next
1396+
char jobNotifyTopic[ JOBS_API_MAX_LENGTH( strlen( otademoconfigCLIENT_IDENTIFIER ) ) ];
1397+
size_t jobNotifyTopicLen = 0;
1398+
1399+
JobsStatus_t status = Jobs_GetTopic( jobNotifyTopic,
1400+
sizeof( jobNotifyTopic ),
1401+
otademoconfigCLIENT_IDENTIFIER,
1402+
strlen( otademoconfigCLIENT_IDENTIFIER ),
1403+
JobsNextJobChanged,
1404+
&jobNotifyTopicLen );
1405+
1406+
prvMQTTSubscribe( jobNotifyTopic, ( uint16_t ) jobNotifyTopicLen, 1 );
1407+
13951408
while( otaAgentState != OtaAgentStateStopped )
13961409
{
13971410
processOTAEvents();

0 commit comments

Comments
 (0)