Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#238 keyboard control improvement #241

Merged
merged 7 commits into from
Sep 19, 2020
Merged

Conversation

vintagepc
Copy link
Owner

Description

Centralizes keyboard handling so that we don't need to implement controls on a per-printer basis.

Behaviour/ Breaking changes

Keys should function as before, but now automatically exist for any printer with that component.

Have you tested the changes?

Locally and with automated testing.

Other

Also auto-generates key input help with -k

Linked issues:

@github-actions
Copy link

Automated Test Code Coverage Report

View details...

File Lines Exec Cover
MK404.cpp 203 190 93%
parts/ADCPeripheral.h 30 30 100%
parts/BasePeripheral.h 30 30 100%
parts/Board.cpp 121 101 83%
parts/Board.h 124 111 89%
parts/I2CPeripheral.h 79 71 89%
parts/IKeyClient.cpp 3 3 100%
parts/IKeyClient.h 1 1 100%
parts/IScriptable.h 49 33 67%
parts/KeyController.cpp 41 27 65%
parts/KeyController.h 3 2 66%
parts/PinSpec.h 10 10 100%
parts/Printer.h 16 14 87%
parts/PrinterFactory.h 40 34 85%
parts/SPIPeripheral.h 20 20 100%
parts/ScriptHost.cpp 262 186 70%
parts/ScriptHost.h 29 29 100%
parts/Scriptable.h 19 17 89%
parts/SoftPWMable.h 25 25 100%
parts/TelemetryHost.cpp 82 57 69%
parts/TelemetryHost.h 35 21 60%
parts/Wiring.h 10 10 100%
parts/boards/EinsyRambo.cpp 136 129 94%
parts/boards/EinsyRambo.h 1 1 100%
parts/boards/MM_Control_01.cpp 61 61 100%
parts/boards/MM_Control_01.h 3 3 100%
parts/boards/Test_Board.cpp 70 70 100%
parts/boards/Test_Board.h 3 3 100%
parts/components/ADC_Buttons.cpp 51 48 94%
parts/components/ADC_Buttons.h 1 1 100%
parts/components/Beeper.cpp 92 71 77%
parts/components/Beeper.h 4 4 100%
parts/components/Button.cpp 39 39 100%
parts/components/Button.h 2 2 100%
parts/components/EEPROM.cpp 78 65 83%
parts/components/EEPROM.h 7 7 100%
parts/components/Fan.cpp 82 81 98%
parts/components/Fan.h 2 2 100%
parts/components/GCodeSniffer.cpp 24 24 100%
parts/components/GCodeSniffer.h 3 3 100%
parts/components/GLHelper.h 79 76 96%
parts/components/HC595.cpp 39 36 92%
parts/components/HC595.h 2 2 100%
parts/components/HD44780.cpp 247 193 78%
parts/components/HD44780.h 14 14 100%
parts/components/HD44780GL.cpp 105 105 100%
parts/components/HD44780GL.h 1 1 100%
parts/components/Heater.cpp 97 96 98%
parts/components/Heater.h 2 2 100%
parts/components/IRSensor.cpp 65 63 96%
parts/components/IRSensor.h 1 1 100%
parts/components/LED.cpp 37 37 100%
parts/components/MMU2.cpp 109 98 89%
parts/components/MMU2.h 1 1 100%
parts/components/PAT9125.h 145 119 82%
parts/components/PINDA.cpp 110 107 97%
parts/components/PINDA.h 2 2 100%
parts/components/RotaryEncoder.cpp 106 103 97%
parts/components/RotaryEncoder.h 3 3 100%
parts/components/SDCard.cpp 306 286 93%
parts/components/SDCard.h 9 9 100%
parts/components/SerialLineMonitor.cpp 89 81 91%
parts/components/SerialLineMonitor.h 1 1 100%
parts/components/TMC2130.cpp 183 171 93%
parts/components/TMC2130.h 5 5 100%
parts/components/Thermistor.cpp 56 52 92%
parts/components/Thermistor.h 1 1 100%
parts/components/UART_Logger.cpp 0 0 --%
parts/components/VoltageSrc.cpp 31 29 93%
parts/components/VoltageSrc.h 2 2 100%
parts/components/uart_pty.cpp 157 127 80%
parts/components/uart_pty.h 3 3 100%
parts/components/w25x20cl.cpp 201 177 88%
parts/components/w25x20cl.h 1 1 100%
parts/pinspecs/PinSpec_2560.h 2 2 100%
parts/pinspecs/PinSpec_32u4.h 2 2 100%
parts/printers/Prusa_MK3.h 9 9 100%
parts/printers/Prusa_MK3MMU2.h 10 10 100%
parts/printers/Prusa_MK3S.cpp 111 109 98%
parts/printers/Prusa_MK3S.h 3 3 100%
parts/printers/Prusa_MK3SMMU2.cpp 33 29 87%
parts/printers/Prusa_MK3SMMU2.h 3 3 100%
parts/printers/Test_Printer.cpp 33 33 100%
parts/printers/Test_Printer.h 3 3 100%
parts/wiring/Einsy_1_0a.h 6 6 100%
parts/wiring/Einsy_1_1a.h 19 19 100%
parts/wiring/MM_Control_01.h 6 6 100%
parts/wiring/Test_Wiring.h 6 6 100%
utility/Color.cpp 67 49 73%
utility/FatImage.cpp 53 48 90%
utility/FatImage.h 28 17 60%
utility/GLObj.cpp 180 171 95%
utility/GLObj.h 6 6 100%
utility/GLPrint.cpp 105 105 100%
utility/GLPrint.h 12 12 100%
utility/MK3SGL.cpp 448 417 93%
utility/MK3SGL.h 11 11 100%
utility/MK3S_Bear.h 88 84 95%
utility/MK3S_Full.h 13 13 100%
utility/MK3S_Lite.h 84 82 97%
utility/OBJCollection.h 24 23 95%
utility/SerialPipe.cpp 62 39 62%
utility/Util.h 9 9 100%
TOTAL 5537 4966 89%

TOTAL: 5537 lines of code, 4966 lines executed, 89% covered.

@vintagepc vintagepc merged commit ab781c7 into master Sep 19, 2020
@vintagepc vintagepc deleted the 238-Keyboard-control-improvement branch September 19, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Key handler registration
1 participant