Browse Source

Code bereinigt

master
Yves Ehrlich 5 years ago
parent
commit
64e7a371b7
  1. 15
      Code/miniRobotRC/JoystickSteuerung.ino
  2. 2
      Code/miniRobotRC/_main.ino
  3. 10
      Code/miniRobotRC/interruptRoutinen.ino
  4. 6
      Code/miniRobotRC/joystick.ino
  5. 2
      Code/miniRobotRC/remoteControlInit.ino
  6. 5
      Code/miniRobotRC/temp.ino

15
Code/miniRobotRC/JoystickSteuerung.ino

@ -44,21 +44,6 @@ void joystickInit() {
void showValuesOnLCD(){ void showValuesOnLCD(){
//TODO BUILD STRING //TODO BUILD STRING
//lcd.clear();
/*lcd.gotoXY(0,0);
lcd.print(" ");
lcd.gotoXY(0,0);
lcd.print("WithLib");
lcd.gotoXY(0,1);
lcd.print(" ");
lcd.gotoXY(0,1);
lcd.print("LeftPWM: ");
lcd.print(left -> PWMValue);
lcd.gotoXY(0,2);
lcd.print(" ");
lcd.gotoXY(0,2);
lcd.print("RightPWM: ");
lcd.print(right -> PWMValue);*/
lcdLines[0] = "Links: " + String(left -> PWMValue, DEC); lcdLines[0] = "Links: " + String(left -> PWMValue, DEC);
lcdLines[1] = "Rechts: " + String(right -> PWMValue, DEC); lcdLines[1] = "Rechts: " + String(right -> PWMValue, DEC);
} }

2
Code/miniRobotRC/_main.ino

@ -19,8 +19,6 @@ void setup() {
} }
void loop() { void loop() {
//lcdMenu();
while(!tasten.getButtonCycle(buttonStart)) { while(!tasten.getButtonCycle(buttonStart)) {
manualDigitalDrive(); manualDigitalDrive();
updateTemp(); updateTemp();

10
Code/miniRobotRC/interruptRoutinen.ino

@ -1,15 +1,5 @@
//HIER KOMMT ALLES REIN WAS 1 MAL PRO ms AUFGERUFEN WERDEN SOLL!!! //HIER KOMMT ALLES REIN WAS 1 MAL PRO ms AUFGERUFEN WERDEN SOLL!!!
ISR(TIMER2_COMPA_vect) { ISR(TIMER2_COMPA_vect) {
tasten.checkButtons(); tasten.checkButtons();
/*renderTime++;
if(renderTime >= renderTimeout) {
lcd.clear();
for(uint8_t i = 0; i < sizeof(lcdLines); i++) {
lcd.gotoXY(0, i);
lcd.print(lcdLines[i]);
}
lcd.renderAll();
renderTime = 0;
} */
} }
//ALLE anderen ISR kommen HIER drunter!!! //ALLE anderen ISR kommen HIER drunter!!!

6
Code/miniRobotRC/joystick.ino

@ -20,14 +20,8 @@ void motorMapping() {
pwmB = map(leftPWM, -255,255,leftMin,leftMax); pwmB = map(leftPWM, -255,255,leftMin,leftMax);
pwmA = map(rightPWM, -255,255,rightMin,rightMax); pwmA = map(rightPWM, -255,255,rightMin,rightMax);
if((millis() - temp) > 100) { if((millis() - temp) > 100) {
// lcd.clear();
// lcd.println("Links: ");
lcdLines[0] = "Links: " + String(pwmB, DEC); lcdLines[0] = "Links: " + String(pwmB, DEC);
// lcd.println(pwmB);
// lcd.gotoXY(0,2);
// lcd.println("Rechts: ");
lcdLines[1] = "Rechts: " + String(pwmA, DEC); lcdLines[1] = "Rechts: " + String(pwmA, DEC);
// lcd.println(pwmA);
} }
senden(); senden();

2
Code/miniRobotRC/remoteControlInit.ino

@ -7,7 +7,7 @@ void remoteControlInit() {
//Pegelwandler ein //Pegelwandler ein
pinMode(_OE_LEVEL, OUTPUT); pinMode(_OE_LEVEL, OUTPUT);
digitalWrite(_OE_LEVEL, HIGH); digitalWrite(_OE_LEVEL, HIGH);
//Hintergrundbeleuchtung an, halbe Helligkeit
//Hintergrundbeleuchtung an
pinMode(BL, OUTPUT); pinMode(BL, OUTPUT);
BRIGHTNESS = 30; BRIGHTNESS = 30;
//LCD init, invert, vop, tempcoef, bias //LCD init, invert, vop, tempcoef, bias

5
Code/miniRobotRC/temp.ino

@ -11,11 +11,6 @@
radio.startListening(); radio.startListening();
while(!radio.available()){ while(!radio.available()){
//Serial.println("nix"); //Serial.println("nix");
/* unsigned long currentMicros = micros();
if((unsigned long)(currentMicros - start) >= 1){
err = true;
} */
if((millis() - temp_time) >= 10) break; if((millis() - temp_time) >= 10) break;
} }
if(/* !err */ true){ if(/* !err */ true){

Loading…
Cancel
Save