X-Git-Url: https://git.donarmstrong.com/?p=kiibohd-controller.git;a=blobdiff_plain;f=Macro%2FPartialMap%2Fmacro.c;h=e861f0edabe1f3106e42806303b19a467a8d8e22;hp=8f1d1b826e78a2bc16bc3daef114695dee0e0604;hb=59d425ccfe1ca3019ba80ad6dd4a228b7c7cbe33;hpb=d9ba60b34ee80e073ef708a7e9e58d8b8529a0e2 diff --git a/Macro/PartialMap/macro.c b/Macro/PartialMap/macro.c index 8f1d1b8..e861f0e 100644 --- a/Macro/PartialMap/macro.c +++ b/Macro/PartialMap/macro.c @@ -1378,6 +1378,19 @@ void cliFunc_capSelect( char* args ) printHex( argSet[2] ); print( "..." NL ); + // Make sure this isn't the reload capability + // If it is, and the remote reflash define is not set, ignore + if ( flashModeEnabled_define == 0 ) for ( uint32_t cap = 0; cap < CapabilitiesNum; cap++ ) + { + if ( CapabilitiesList[ cap ].func == (const void*)Output_flashMode_capability ) + { + print( NL ); + warn_print("flashModeEnabled not set, cancelling firmware reload..."); + info_msg("Set flashModeEnabled to 1 in your kll configuration."); + return; + } + } + void (*capability)(uint8_t, uint8_t, uint8_t*) = (void(*)(uint8_t, uint8_t, uint8_t*))(CapabilitiesList[ cap ].func); capability( argSet[0], argSet[1], &argSet[2] ); }