Rubääääh! Auf meiner HW läuft es nicht mehr... (1.27 läuft noch, HW Schaden also ausgeschlossen)
Also genauer: die HW Keys werden nicht mehr erkannt. Ich kann also schon bei der Versionsabfrage nix machen auch im TESTING Mode geht nix.
Vielleicht beisst sich auch noch was mit anderen Optionen die ich ausversehen noch aktiviert habe? Yacco, kannst Du mal drauf schauen?
Ich habe auch kurz versucht es zu debuggen, irgendwie hatte ich das Gefühl der geht gar nicht in den Teil wo die HW Keys abgefragt werden....
Gruß,
Carsten
Code: Alles auswählen
// ----- begin of configuration parameters -----
// use ShiftRegLCD lib instead of LiquidCrystal lib
// [footprint: decreases ~200 bytes]
#define SRLCD
// ----------
// use Hardwarekeys connected to Ports
// [footprint: ~120 bytes]
#define HWKEYS
// Input pins of the hardbuttons: (used when HWKEYS is defined)
#define HW_RIGHT 10
#define HW_UP 9
#define HW_DOWN 11
#define HW_LEFT 8
#define HW_SELECT 6
// Analog Input pin for cascading buttons
#define KEY_PIN 0
// ----------
// Use an analog Joystick (e.g., Sparkfun Thumb Joystick) instead of Keys (experimental!)
// Joystick and Buttons can be used simultaneously. The center position of the Joystick
// is calibrated during startup, so leave the stick in central position when switching on.
// [footprint: ~200 bytes]
//#define JOYSTICK
// uncomment the following line to enable the joystick select key
//#define JS_SELECT_PIN A0
#define JS_HOR_PIN A1
#define JS_VERT_PIN A2
// Configuration of the Axes
#define JS_HOR_SIGN +1
#define JS_VERT_SIGN -1
#define JS_DEADBAND 48
// inverts the switch level of the SELECT key (default: high)
//#define JS_INV_SELECT_KEY
// ----------
// includes a hidden state to check the joystick input.
// activated by pressing the RIGHT key in state 0 for more than a second.
// [footprint: ~174 bytes]
//#define CHECK_INPUT
// ----------
// includes code to read and visualize the state of the battery via the OSD functionality
// in MWC Versions >= v1.7prebis
// [footprint: ~200 bytes]
#define BATTERY_LEVEL
// Warning Levels:
//
// ----------RED------->| |<------GREEN---------
// | |
// VBATLEVEL3 ... VBATLEVEL2 ... VBATLEVEL1 ... VBATLEVEL0
// | |
// |<------------------YELLOW------------------>|
#define VBATLEVEL0 114 // 11.4V - 3.8V per cell @ 3S [above: green, below: green/yellow]
#define VBATLEVEL1 111 // 11.1V - 3.7V [above: green/yellow, below: yellow ]
#define VBATLEVEL2 108 // 10.8V - 3.6V [above: yellow, below: yellow/red ]
#define VBATLEVEL3 105 // 10.5V - 3.5V [above: yellow/red, below: red ]
// ----------
// include logging to SD/SDHC card (formatted to FAT16 or FAT32) via SPI
// [footprint: ~12 kbytes]
//#define LOGGING
//#define CHIP_SELECT 10
// enables output in LogView format (~1 kbyte)
//#define LOGVIEW
// Logging Modes resp. LogFile Formats:
#define LOG_ERROR -1
#define NO_LOGGING 0
#define LF_BINARY 1
#define LF_LOGVIEW 2
// ----------
// include routines to show some output as simple character graphic (for servo signals and angles)
// [footprint: ~2.3 kbytes]
#define GRAPHIC
// ----------
// track minimum and maximum values of certain values
// [footprint: ~750 bytes]
#define MINMAX
#ifdef MINMAX
#define MM_ACT [0]
#define MM_DIM [3]
#define MM_VAL [minMaxMode]
#else
#define MM_ACT
#define MM_DIM
#define MM_VAL
#endif
// ----------
// include routines to show the state of the application with three leds
// (red: error, yellow: busy/waiting for input, green: logging)
// [footprint: ~220 bytes]
//#define STATUS_LEDS
// Caution: Default Pins of LEDs and Joystick input overlap
#define RED_LED A5
#define YELLOW_LED A4
#define GREEN_LED A3
// ----------
// if defined, allows dimming of LCD backlight intensity (Pin 10)
// [footprint: ~50 bytes (?)]
//#define BACKLIGHT
#define BACKLIGHT_PIN 10
// -----
// disables a connected APC220 module during playback of logfiles. It is assumed that the ENABLE pin of
// APC220 is connected to pin D2 of the Arduino board. I soldered a 20k resistor between the two pins,
// seems to work.
// [footprint: 40 bytes]
//#define APC220
#define APC220_ENABLE_PIN 2
// -----
// :)
#define CREDITS
// simulates a serial connection, SELECT key in state "ESC Out" changes the configuration
//#define TEST
// ----------------
// Number of hardbuttons:
#define NUM_KEYS 5
// Identifiers for the five hardbuttons:
#define KEY_RIGHT 0
#define KEY_UP 1
#define KEY_DOWN 2
#define KEY_LEFT 3
#define KEY_SELECT 4
#define STATUS 5 // Last column in the transition table is reserved for status flags
// RC Channel Aliases:
#define ROLL 0
#define PITCH 1
#define YAW 2
#define THROTTLE 3
#define AUX1 4
#define AUX2 5
#define CAM_ROLL 6
#define CAM_PIT 7