Hey guys,
I am wondering if there is any possibility to get some keys working without a display? Sounds weird but maybe makes more sense considering this:
As I am using a Minitronics from RepRapWorld there are almost no pins left on my controller board (even if, i don't necessarily want one). What I want to do is making the Z_PROBE_HEIGHT calibration a little bit easier. I want to use 3 buttons in total:
Key 1: If pushed for about 3 seconds the controller enters the calibration mode (or leaves it)
Key 2: Moves Z 0.05 mm upwards
Key 3: Moves Z 0.05 mm downwards
When key 1 is pushed for another 3 seconds in calibration mode the current Z_PROBE_HEIGHT is read from EEPROM, the current Z-Value is also read, some math is done and the new (correct) Z_PROBE_HEIGHT value is written into EEPROM. That would make my life way simpler.
Even though this doesn't makes sense for everyone reading this I really would appreciate your help!
I already tried to manage it for a couple of hours but couldn't get it working. What I did was the following:
inspired by: https://www.repetier.com/documentation/repetier-firmware/rf-installation/<br/><br/><b>in Configuration.h</b>
#define FEATURE_CONTROLLER 0
#define FEATURE_UI_KEYS 1
in ui.h
#define UI_ACTION_CUSTOM 114 //value is not in use, only for testing
#define UI_DISPLAY_TYPE 1
#define UI_HAS_KEYS 1
void ui_init_keys() {
UI_KEYS_INIT_BUTTON_LOW(19); //button connects line to GND (btw, any need to activate the a pullup resistor?)
}
void ui_check_keys(int &action) {
UI_KEYS_BUTTON_LOW(19,UI_ACTION_CUSTOM);
}
in ui.cpp
.....
#if UI_HAS_KEYS == 1
if(action & UI_ACTION_TOPMENU) // Go to start menu
{
menuLevel = 0;
}
action &= 8191; // strip out higher level flags
if(action >= 2000 && action < 3000)
{
setStatusP(Com::translatedF(UI_TEXT_STRING_ACTION_ID));
}
else
switch(action)
{
case UI_ACTION_CUSTOM:
Com::printF("testing");
break;
case UI_ACTION_OK:
.....
I also tried some other code-changes but always either get an compile error or nothing happens at all.
Does anyone has a solution for this problem?
Best regards
Stefan
BTW: All buttons and connections are working when I compile a custom project. Just not the implementation with Repetier Firmware.