File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
examples/utility/Provisioning_2.0 Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,12 @@ void OptaFactoryTestClass::begin() {
5959
6060 /* Set ADC resolution to 12 bits */
6161 analogReadResolution (12 );
62- SCB_DisableDCache ();
62+ do {
63+ _info = boardInfo ();
64+ } while (_info == nullptr );
6365
6466}
6567void OptaFactoryTestClass::optaIDTest () {
66- _info = boardInfo ();
6768 if (_info->magic == 0xB5 )
6869 {
6970 if (_info->vid == VID_FINDER)
@@ -299,6 +300,9 @@ void OptaFactoryTestClass::inputManage(void)
299300 digitalWrite (LEDG, LOW);
300301 digitalWrite (LEDB, LOW);
301302 _all_on = false ;
303+ if (_info->_board_functionalities .rs485 == 0 ) {
304+ _test_running = false ;
305+ }
302306 }
303307}
304308
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class OptaFactoryTestClass {
2424 bool _all_on = false ;
2525 bool _rs485_test_done = false ;
2626 bool _test_running = false ;
27- OptaBoardInfo *_info;
27+ OptaBoardInfo *_info = nullptr ;
2828 uint32_t _ms10 = 0 ;
2929 uint32_t _ms100 = 0 ;
3030 uint32_t _nextBoardInfoPrint = 0 ;
You can’t perform that action at this time.
0 commit comments