
pitterh
Themenstarter
- Dabei seit
- 26.02.2011
- Beiträge
- 37
- Punkte Reaktionen
- 3
- Ort
- Kölle
- Details E-Antrieb
- Umgebauter elfkw Kettenmotor, Barmal Contr. FC 2.0
Und noch ne Frage:
was bedeutet ACTION DISPLY NEXT VIEW, kann ich damit zwischen Startbildschirm und Fahrbildschirm während der Fahrt hin und her toggeln?
So ist es gedacht, allerdings ist leider noch niemand dazu gekommen, diese Funktion mit Leben zu füllen. Da passiert also im Moment einfach nichts.
Ich habe mal versucht ACTION DISPLY NEXT VIEW mit Leben zu füllen.
So wie es gedacht war habe ich es nicht hinbekommen .
// go to prev view in display. Rools over if at the beginnin
// go the new view in display. Rolls over if at the end
Ich habe einen anderen Weg gewählt, um das GRAPHIC und TEXT DISPLAY ohne das display_show_welcome_msg sehen zu können.
Benutzt habe ich den Switch, ACTION_PROFILE.
Alle Profile habe ich ohne das E am Ende neu geschrieben. Nun kann ich bequem während der Fahrt und im
Stand auf das GRAPHIC und TEXT DISPLAY umschalten.
Die Automatische Funktion: Vorderrad dreht => GRAPHIC DISPLAY erscheint, gibt es nicht mehr.
Mir ist aufgefallen das das blaue Profil als 0 hinterlegt => 0= !display_force_text
Es könnte auch durch cad>0 ersetzt werden, wenn man nun aufhört zu treten erscheint das TEXT DISPLAY.
Ich bitte darum das die Programmierer hier im Forum sich den Code einmal auf Fehler anschauen.
Geändert wurde: spd>0 gegen current_profil>0
Display. cpp
Code:
1069 if (menu_active)
display_mode=DISPLAY_MODE_MENU;
else if (current_profil>0 && !display_force_text) // switch profils graphic/text
display_mode=DISPLAY_MODE_GRAPHIC;
Die Profile 1 u. 2 werden im Text Display angezeigt
Bluetooth wird von mir nicht genutzt.
648
lcd.setCursor(13,5); // switch profils graphic/text
lcd.print(current_profile+1); // switch profile im bluetooth-symbol 13,5
SWITCHES.CPP
Code:
213
static void action_set_profil(const boolean new_profil) // switch profils graphic/text
{
current_profil = new_profil;
activate_new_profil();
}
298
case ACTION_PROFIL_1: // switch profils graphic/text
action_set_profil(0);
break;
case ACTION_PROFIL_2: // switch profils graphic/text
action_set_profil(1);
break;
case ACTION_PROFIL: // switch profils graphic/text
action_set_profil(!current_profil);
break;
SWITCHES ACTION H
Code:
40
ACTION_PROFIL_1, // switch to profil 1 graphic/text
ACTION_PROFIL_2, // switch to profil 2 graphic/text
ACTION_PROFIL, // switch profils graphic/text
ARDUINO
Code:
238
boolean current_profile=0; //0: blue profile, 1: red profile
boolean current_profil=0; // switch profils graphic/text
1356
void activate_new_profil() // switch profils graphic/text
{
current_profil==0;
Menu.CCP
Code:
98
static const char desc_main_profil[] PROGMEM = "GRAPHIC/TEXT"; // switch profils graphic/text
static MenuItem m_main_profil(desc_main_profil);
240
static void handle_profil(MenuItem* p_menu_item) // switch profils graphic/text
{
current_profil=!(current_profil);
activate_new_profil();
menu_active = false;
378
#ifdef SUPPORT_PROFIL_SWITCH_MENU // switch profils graphic/text
menu_main.add_item(&m_main_profil, &handle_profil);
GLOBALS. H
Code:
64
extern boolean current_profil; // switch profils graphic/text
extern boolean current_profile
77
extern void activate_new_profile();
extern void action_none();
extern void activate_new_profil(); //switch profils graphic/text
CONFIG_H
Bevor ich die hochlade muss der Befehle, in der config_h,
#define SUPPORT_PROFIL_SWITCH_MENU , neu geschrieben werden, und der Befehl,
const sw_action SW_DISPLAY1_SHORT_PRESS =ACTION_PROFILE, auf PROFIL geändert werden.
Da beim öffnen des Configurator,die config_h neu geschrieben wird, müssen die Profile wieder
geändert werden. Gibt es eine Möglichkeit dieses zu umgehen?
Code:
const switch_name MENU_BUTTON_UP = SWITCH_DISPLAY2;
const switch_name MENU_BUTTON_DOWN = SWITCH_DISPLAY1;
const sw_action SW_THROTTLE_SHORT_PRESS =ACTION_SET_SOFT_POTI;
const sw_action SW_THROTTLE_LONG_PRESS =ACTION_SHUTDOWN_SYSTEM;
const sw_action SW_DISPLAY1_SHORT_PRESS =ACTION_PROFIL; // switch profils graphic/text
const sw_action SW_DISPLAY1_LONG_PRESS =ACTION_TOGGLE_LIGHTS;
const sw_action SW_DISPLAY2_SHORT_PRESS =ACTION_PROFILE; // PROFILE 1+2
const sw_action SW_DISPLAY2_LONG_PRESS =ACTION_ENTER_MENU;
const sw_action SW_POTI_SHORT_PRESS =ACTION_NONE;
const sw_action SW_POTI_LONG_PRESS =ACTION_NONE;
#define SUPPORT_PROFILE_SWITCH_MENU
#define SUPPORT_PROFIL_SWITCH_MENU // switch profils graphic/text
schöne Grüße
Peter