|
@@ -39,9 +39,9 @@ static void rpc_system_app_start_process(const PB_Main* request, void* context)
|
|
|
furi_assert(!rpc_app->last_id);
|
|
furi_assert(!rpc_app->last_id);
|
|
|
furi_assert(!rpc_app->last_data);
|
|
furi_assert(!rpc_app->last_data);
|
|
|
|
|
|
|
|
- FURI_LOG_D(TAG, "StartProcess: id %ld", request->command_id);
|
|
|
|
|
|
|
+ FURI_LOG_D(TAG, "StartProcess: id %lu", request->command_id);
|
|
|
|
|
|
|
|
- PB_CommandStatus result = PB_CommandStatus_ERROR_APP_CANT_START;
|
|
|
|
|
|
|
+ PB_CommandStatus result;
|
|
|
|
|
|
|
|
Loader* loader = furi_record_open(RECORD_LOADER);
|
|
Loader* loader = furi_record_open(RECORD_LOADER);
|
|
|
const char* app_name = request->content.app_start_request.name;
|
|
const char* app_name = request->content.app_start_request.name;
|
|
@@ -62,7 +62,7 @@ static void rpc_system_app_start_process(const PB_Main* request, void* context)
|
|
|
} else if(status == LoaderStatusOk) {
|
|
} else if(status == LoaderStatusOk) {
|
|
|
result = PB_CommandStatus_OK;
|
|
result = PB_CommandStatus_OK;
|
|
|
} else {
|
|
} else {
|
|
|
- furi_crash("Programming Error");
|
|
|
|
|
|
|
+ furi_crash(NULL);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
result = PB_CommandStatus_ERROR_INVALID_PARAMETERS;
|
|
result = PB_CommandStatus_ERROR_INVALID_PARAMETERS;
|
|
@@ -70,7 +70,7 @@ static void rpc_system_app_start_process(const PB_Main* request, void* context)
|
|
|
|
|
|
|
|
furi_record_close(RECORD_LOADER);
|
|
furi_record_close(RECORD_LOADER);
|
|
|
|
|
|
|
|
- FURI_LOG_D(TAG, "StartProcess: response id %ld, result %d", request->command_id, result);
|
|
|
|
|
|
|
+ FURI_LOG_D(TAG, "StartProcess: response id %lu, result %d", request->command_id, result);
|
|
|
rpc_send_and_release_empty(session, request->command_id, result);
|
|
rpc_send_and_release_empty(session, request->command_id, result);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -117,7 +117,7 @@ static void rpc_system_app_exit_request(const PB_Main* request, void* context) {
|
|
|
PB_CommandStatus status;
|
|
PB_CommandStatus status;
|
|
|
|
|
|
|
|
if(rpc_app->app_callback) {
|
|
if(rpc_app->app_callback) {
|
|
|
- FURI_LOG_D(TAG, "ExitRequest: id %ld", request->command_id);
|
|
|
|
|
|
|
+ FURI_LOG_D(TAG, "ExitRequest: id %lu", request->command_id);
|
|
|
furi_assert(!rpc_app->last_id);
|
|
furi_assert(!rpc_app->last_id);
|
|
|
furi_assert(!rpc_app->last_data);
|
|
furi_assert(!rpc_app->last_data);
|
|
|
rpc_app->last_id = request->command_id;
|
|
rpc_app->last_id = request->command_id;
|
|
@@ -125,7 +125,7 @@ static void rpc_system_app_exit_request(const PB_Main* request, void* context) {
|
|
|
} else {
|
|
} else {
|
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
|
FURI_LOG_E(
|
|
FURI_LOG_E(
|
|
|
- TAG, "ExitRequest: APP_NOT_RUNNING, id %ld, status: %d", request->command_id, status);
|
|
|
|
|
|
|
+ TAG, "ExitRequest: APP_NOT_RUNNING, id %lu, status: %d", request->command_id, status);
|
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -142,7 +142,7 @@ static void rpc_system_app_load_file(const PB_Main* request, void* context) {
|
|
|
|
|
|
|
|
PB_CommandStatus status;
|
|
PB_CommandStatus status;
|
|
|
if(rpc_app->app_callback) {
|
|
if(rpc_app->app_callback) {
|
|
|
- FURI_LOG_D(TAG, "LoadFile: id %ld", request->command_id);
|
|
|
|
|
|
|
+ FURI_LOG_D(TAG, "LoadFile: id %lu", request->command_id);
|
|
|
furi_assert(!rpc_app->last_id);
|
|
furi_assert(!rpc_app->last_id);
|
|
|
furi_assert(!rpc_app->last_data);
|
|
furi_assert(!rpc_app->last_data);
|
|
|
rpc_app->last_id = request->command_id;
|
|
rpc_app->last_id = request->command_id;
|
|
@@ -151,7 +151,7 @@ static void rpc_system_app_load_file(const PB_Main* request, void* context) {
|
|
|
} else {
|
|
} else {
|
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
|
FURI_LOG_E(
|
|
FURI_LOG_E(
|
|
|
- TAG, "LoadFile: APP_NOT_RUNNING, id %ld, status: %d", request->command_id, status);
|
|
|
|
|
|
|
+ TAG, "LoadFile: APP_NOT_RUNNING, id %lu, status: %d", request->command_id, status);
|
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -177,7 +177,7 @@ static void rpc_system_app_button_press(const PB_Main* request, void* context) {
|
|
|
} else {
|
|
} else {
|
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
|
FURI_LOG_E(
|
|
FURI_LOG_E(
|
|
|
- TAG, "ButtonPress: APP_NOT_RUNNING, id %ld, status: %d", request->command_id, status);
|
|
|
|
|
|
|
+ TAG, "ButtonPress: APP_NOT_RUNNING, id %lu, status: %d", request->command_id, status);
|
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -202,7 +202,7 @@ static void rpc_system_app_button_release(const PB_Main* request, void* context)
|
|
|
} else {
|
|
} else {
|
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
status = PB_CommandStatus_ERROR_APP_NOT_RUNNING;
|
|
|
FURI_LOG_E(
|
|
FURI_LOG_E(
|
|
|
- TAG, "ButtonRelease: APP_NOT_RUNNING, id %ld, status: %d", request->command_id, status);
|
|
|
|
|
|
|
+ TAG, "ButtonRelease: APP_NOT_RUNNING, id %lu, status: %d", request->command_id, status);
|
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
rpc_send_and_release_empty(session, request->command_id, status);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -300,7 +300,7 @@ void rpc_system_app_confirm(RpcAppSystem* rpc_app, RpcAppSystemEvent event, bool
|
|
|
free(rpc_app->last_data);
|
|
free(rpc_app->last_data);
|
|
|
rpc_app->last_data = NULL;
|
|
rpc_app->last_data = NULL;
|
|
|
}
|
|
}
|
|
|
- FURI_LOG_D(TAG, "AppConfirm: event %d last_id %ld status %d", event, last_id, status);
|
|
|
|
|
|
|
+ FURI_LOG_D(TAG, "AppConfirm: event %d last_id %lu status %d", event, last_id, status);
|
|
|
rpc_send_and_release_empty(session, last_id, status);
|
|
rpc_send_and_release_empty(session, last_id, status);
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|