mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
great changes
This commit is contained in:
18
src/bus.cpp
Normal file
18
src/bus.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "Bus/BusScannerFactory.h"
|
||||
#include "Class/NotAsinc.h"
|
||||
#include "Global.h"
|
||||
|
||||
void busInit() {
|
||||
myNotAsincActions->add(
|
||||
do_BUSSCAN, [&](void*) {
|
||||
doBusScan();
|
||||
},
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void doBusScan() {
|
||||
String res = "";
|
||||
BusScanner* scanner = BusScannerFactory::get(configSetupJson, busToScan, res);
|
||||
scanner->scan();
|
||||
jsonWriteStr(configLiveJson, String(scanner->tag()), res);
|
||||
}
|
||||
Reference in New Issue
Block a user