mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Update barcode gen
This commit is contained in:
@@ -43,6 +43,14 @@ void init_types() {
|
||||
code_128->start_pos = 0;
|
||||
barcode_type_objs[CODE128] = code_128;
|
||||
|
||||
BarcodeTypeObj* code_128c = malloc(sizeof(BarcodeTypeObj));
|
||||
code_128c->name = "CODE-128C";
|
||||
code_128c->type = CODE128C;
|
||||
code_128c->min_digits = 2;
|
||||
code_128c->max_digits = -1;
|
||||
code_128c->start_pos = 0;
|
||||
barcode_type_objs[CODE128C] = code_128c;
|
||||
|
||||
BarcodeTypeObj* codabar = malloc(sizeof(BarcodeTypeObj));
|
||||
codabar->name = "Codabar";
|
||||
codabar->type = CODABAR;
|
||||
@@ -82,6 +90,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, "CODE-128C") == 0) {
|
||||
return barcode_type_objs[CODE128C];
|
||||
}
|
||||
if(furi_string_cmp_str(type_string, "Codabar") == 0) {
|
||||
return barcode_type_objs[CODABAR];
|
||||
}
|
||||
@@ -133,4 +144,4 @@ const char* get_error_code_message(ErrorCode error_code) {
|
||||
default:
|
||||
return "Could not read barcode data";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user