Willy-JL 2 lat temu
rodzic
commit
3410075926
2 zmienionych plików z 9 dodań i 9 usunięć
  1. 2 2
      wiiec/application.fam
  2. 7 7
      wiiec/wii_anal.c

+ 2 - 2
wiiec/application.fam

@@ -3,7 +3,7 @@
 App(
 App(
 	# --- App Info
 	# --- App Info
 	appid="wii_ec_anal",
 	appid="wii_ec_anal",
-	name="Wii EC Analyser",
+	name="[WII] EC Analyser",
 
 
 	# --- Entry point
 	# --- Entry point
 	apptype=FlipperAppType.EXTERNAL,
 	apptype=FlipperAppType.EXTERNAL,
@@ -32,5 +32,5 @@ App(
 #	fap_version=(1,0),
 #	fap_version=(1,0),
 
 
 	fap_icon="WiiEC.png",
 	fap_icon="WiiEC.png",
-	fap_category="Cyborg Systems",
+	fap_category="GPIO",
 )
 )

+ 7 - 7
wiiec/wii_anal.c

@@ -399,7 +399,7 @@ int32_t  wii_ec_anal (void)
 	// ==================== Main event loop ====================
 	// ==================== Main event loop ====================
 
 
 	if (state->run)  do {
 	if (state->run)  do {
-		bool        redraw = false;
+		// bool        redraw = false;
 		FuriStatus  status = FuriStatusErrorTimeout;
 		FuriStatus  status = FuriStatusErrorTimeout;
 
 
 		// Wait for a message
 		// Wait for a message
@@ -451,13 +451,13 @@ int32_t  wii_ec_anal (void)
 
 
 			//---------------------------------------------
 			//---------------------------------------------
 			case EVID_WIIEC:  // WiiMote Perhipheral
 			case EVID_WIIEC:  // WiiMote Perhipheral
-				if (evWiiEC(&msg, state))  redraw = true ;
+				evWiiEC(&msg, state);
 				break;
 				break;
 
 
 			//---------------------------------------------
 			//---------------------------------------------
 			case EVID_KEY:  // Key events
 			case EVID_KEY:  // Key events
 				patBacklight(state);
 				patBacklight(state);
-				if (evKey(&msg, state))  redraw = true;
+				evKey(&msg, state);
 				break;
 				break;
 
 
 			//---------------------------------------------
 			//---------------------------------------------
@@ -471,7 +471,7 @@ int32_t  wii_ec_anal (void)
 		}
 		}
 
 
 		// *** Update the GUI screen via the viewport ***
 		// *** Update the GUI screen via the viewport ***
-		if (redraw)  view_port_update(vpp) ;
+		view_port_update(vpp) ;
 
 
 		// *** Try to release the plugin state variables ***
 		// *** Try to release the plugin state variables ***
 		if (furi_mutex_release(state->mutex) != FuriStatusOk) {
 		if (furi_mutex_release(state->mutex) != FuriStatusOk) {
@@ -485,13 +485,13 @@ int32_t  wii_ec_anal (void)
 
 
 bail:
 bail:
 	// 10. Release system notification queue
 	// 10. Release system notification queue
-	if (state->notify) {
+	if (state && state->notify) {
 		furi_record_close(RECORD_NOTIFICATION);
 		furi_record_close(RECORD_NOTIFICATION);
 		state->notify = NULL;
 		state->notify = NULL;
 	}
 	}
 
 
 	// 9. Stop the timer
 	// 9. Stop the timer
-	if (state->timer) {
+	if (state && state->timer) {
 		(void)furi_timer_stop(state->timer);
 		(void)furi_timer_stop(state->timer);
 		furi_timer_free(state->timer);
 		furi_timer_free(state->timer);
 		state->timer = NULL;
 		state->timer = NULL;
@@ -512,7 +512,7 @@ bail:
 	}
 	}
 
 
 	// 5. Free the mutex
 	// 5. Free the mutex
-	if (state->mutex) {
+	if (state && state->mutex) {
 		furi_mutex_free(state->mutex);
 		furi_mutex_free(state->mutex);
 		state->mutex = NULL;
 		state->mutex = NULL;
 	}
 	}