Refactor services into classes (#183)
This commit is contained in:
committed by
GitHub
parent
bb7e79886f
commit
3be251d8fb
@@ -21,20 +21,12 @@ namespace service::sdcard { extern const ServiceManifest manifest; }
|
||||
|
||||
static Dispatcher mainDispatcher;
|
||||
|
||||
static const service::ServiceManifest* const system_services[] = {
|
||||
&service::sdcard::manifest,
|
||||
&service::wifi::manifest
|
||||
};
|
||||
|
||||
static const hal::Configuration* hardwareConfig = nullptr;
|
||||
|
||||
static void register_and_start_system_services() {
|
||||
TT_LOG_I(TAG, "Registering and starting system services");
|
||||
int app_count = sizeof(system_services) / sizeof(service::ServiceManifest*);
|
||||
for (int i = 0; i < app_count; ++i) {
|
||||
addService(system_services[i]);
|
||||
tt_check(service::startService(system_services[i]->id));
|
||||
}
|
||||
addService(service::sdcard::manifest);
|
||||
addService(service::wifi::manifest);
|
||||
}
|
||||
|
||||
void initHeadless(const hal::Configuration& config) {
|
||||
|
||||
Reference in New Issue
Block a user