-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref #32 Example: Input file epson.toml ``` [[EPSON]] rkey = 0x364A wkey = "Bsboujgp" wkey1 = "Arantifo" models = ["ET-2850", "ET-2851", "ET-2853", "ET-2855", "L4260", "L4261", "L4263", "L4265", "L4266", "L4267", "L4268", "L4269", "Workforce ST-C2100"] mem = [ { addr = [0x1C,0x34,0x35,0x36,0x37,0xFF] , desc = "Waste counters (?)" , reset = [0x00,0x00,0x00,0x5E,0x5E,0x5E] }, { addr = [0x2F] , desc = "Waste counter" }, { addr = [0x30,0x31] , desc = "Waste counter" }, { addr = [0x32,0x33] , desc = "Waste counter" }, { addr = [0xFC,0xFD] , desc = "Waste counter" }, { addr = [0xFE] , desc = "Waste counter" }, ] rlen = 2 wlen = 2 mem_high = 0x7FF ``` Command: ``` python3 parse_devices.py -T -c epson.toml -i -l 200 ``` Conversion: ``` PRINTER_CONFIG = { "ET-2850": { "read_key": [74, 54], "write_key": b"Arantifo", "raw_waste_reset": {28: 0, 52: 0, 53: 0, 54: 94, 55: 94, 255: 94, 47: 0, 48: 0, 49: 0, 50: 0, 51: 0, 252: 0, 253: 0, 254: 0}, "alias": ["ET-2851", "ET-2853", "ET-2855", "L4260", "L4261", "L4263", "L4265", "L4266", "L4267", "L4268", "L4269", "Workforce ST-C2100"], "stats": { "Maintenance required level of 1st waste ink counter": [54], "Maintenance required level of 2nd waste ink counter": [55], "Maintenance required level of 3rd waste ink counter": [255], }, } } ```
- Loading branch information
Showing
4 changed files
with
83 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ pyasyncore;python_version>="3.12" | |
tkcalendar | ||
pyperclip | ||
black | ||
tomli |