1st working approach after last changes

This commit is contained in:
2026-01-22 21:18:01 +03:00
parent 873f292a11
commit bccc7a9b29
8 changed files with 43 additions and 14 deletions

View File

@@ -112,3 +112,17 @@ void dumpConf(){
void confHelp(){
sl_conf_showhelp(-1, opts);
}
const char* errcodes[MCC_E_AMOUNT] = {
[MCC_E_OK] = "OK",
[MCC_E_FATAL] = "Fatal error",
[MCC_E_BADFORMAT] = "Wrong data format",
[MCC_E_ENCODERDEV] = "Encoder error",
[MCC_E_MOUNTDEV] = "Mount error",
[MCC_E_FAILED] = "Failed to run"
};
// return string with error code
const char *EcodeStr(mcc_errcodes_t e){
if(e >= MCC_E_AMOUNT) return "Wrong error code";
return errcodes[e];
}