Fork for Get Started Demo
Dependencies: DebouncedInterrupt dash7-alp mbed-rtos mbed wizzi-utils
Fork of D7A_Demo_full by
Diff: main.cpp
- Revision:
- 14:02bfe80b3db8
- Parent:
- 13:218d2b6a9390
- Child:
- 15:78f0945fbf69
--- a/main.cpp Wed Jan 27 19:32:04 2016 +0000 +++ b/main.cpp Thu Jan 28 09:56:25 2016 +0000 @@ -218,7 +218,7 @@ PRINT("NOTIFY TEMPERATURE %d C\r\n", temp_data.value); // Notify temp value - //check_status(wm1001->notify_filechange(TEMP_DATA_FILE_ID), "TEMP REPORT"); + check_status(wm1001->notify_filechange(TEMP_DATA_FILE_ID), "TEMP REPORT"); // Wait 5 minutes // The function Thread::wait(...) takes a uin32_t as parameter @@ -239,27 +239,21 @@ system_open(); // Initialize ALP modem - //D7A_modem wm1001(&shield1001_config, PB_0); - D7A_modem wm1001(&shield1001_config); - - // Wait for modem to notify its files if there is any - //Thread::wait(500); + D7A_modem wm1001(&shield1001_config, PB_0); // Register the files - //wm1001.register_file(&revision_device_fh); + wm1001.register_file(&revision_device_fh); wm1001.register_file(&alarm_data_fh); wm1001.register_file(&alarm_cmd_fh); - //wm1001.register_file(&temp_data_fh); + wm1001.register_file(&temp_data_fh); // Send the Revision report - //PRINT("NOTIFY REVISION\r\n"); - //check_status(wm1001.notify_filechange(REVISION_DEVICE_FILE_ID), "REPORT REVISION"); + PRINT("NOTIFY REVISION\r\n"); + check_status(wm1001.notify_filechange(REVISION_DEVICE_FILE_ID), "REPORT REVISION"); // Init Threads Thread t_alarm_thread(alarm_thread, &wm1001, osPriorityNormal, DEFAULT_STACK_SIZE*8); - //Thread t_temp_thread(temp_thread, &wm1001, osPriorityNormal, DEFAULT_STACK_SIZE*4); - - //alarm_thread(&wm1001); + Thread t_temp_thread(temp_thread, &wm1001, osPriorityNormal, DEFAULT_STACK_SIZE*4); // Set main task to lowest priority osThreadSetPriority(osThreadGetId(), osPriorityIdle);