mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-26 03:39:58 -07:00
Update and clean apps
This commit is contained in:
@@ -43,6 +43,14 @@ void init_types() {
|
||||
code_128->start_pos = 0;
|
||||
barcode_type_objs[CODE128] = code_128;
|
||||
|
||||
BarcodeTypeObj* codabar = malloc(sizeof(BarcodeTypeObj));
|
||||
codabar->name = "Codabar";
|
||||
codabar->type = CODABAR;
|
||||
codabar->min_digits = 1;
|
||||
codabar->max_digits = -1;
|
||||
codabar->start_pos = 0;
|
||||
barcode_type_objs[CODABAR] = codabar;
|
||||
|
||||
BarcodeTypeObj* unknown = malloc(sizeof(BarcodeTypeObj));
|
||||
unknown->name = "Unknown";
|
||||
unknown->type = UNKNOWN;
|
||||
@@ -74,6 +82,9 @@ BarcodeTypeObj* get_type(FuriString* type_string) {
|
||||
if(furi_string_cmp_str(type_string, "CODE-128") == 0) {
|
||||
return barcode_type_objs[CODE128];
|
||||
}
|
||||
if(furi_string_cmp_str(type_string, "Codabar") == 0) {
|
||||
return barcode_type_objs[CODABAR];
|
||||
}
|
||||
|
||||
return barcode_type_objs[UNKNOWN];
|
||||
}
|
||||
@@ -98,7 +109,7 @@ const char* get_error_code_name(ErrorCode error_code) {
|
||||
return "OK";
|
||||
default:
|
||||
return "Unknown Code";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const char* get_error_code_message(ErrorCode error_code) {
|
||||
@@ -121,5 +132,5 @@ const char* get_error_code_message(ErrorCode error_code) {
|
||||
return "OK";
|
||||
default:
|
||||
return "Could not read barcode data";
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user