- LiFePO4 Speicher Test         
Seite 1 von 3 123 LetzteLetzte
Ergebnis 1 bis 10 von 21

Thema: fehlfunktion bei code

  1. #1
    Erfahrener Benutzer Roboter Experte
    Registriert seit
    04.01.2008
    Alter
    31
    Beiträge
    540

    fehlfunktion bei code

    Anzeige

    Powerstation Test
    ich habe in den beispielcode move_05 ein paar variablen eingebaut, die zählen sollen, wie viele kollisionen es geb und eine funktion, die die deren wert an den bootlader sendet! jetzt bekomme ich die fehlermeldung:
    invalid lvalue in increment! in der zeile betreffenden zeile steht aber nur: "e++;". und in der zweiten meldung steht: "error: expected declaration specifiers before 'while'". in der betreffenden zeile steht:

    uint16_t zahler(void)
    while (true)

    kann mir da bitte jemand helfen? danke schon mal voraus

    roboman

  2. #2
    Neuer Benutzer Öfters hier
    Registriert seit
    06.01.2008
    Beiträge
    27
    ich denke es wär sinnvoll den ganzen text zu posten. vll ist es irgentwie im zusammenhang.

    auf jedenfall gint es in diesen 2 (3) zeilen keine fehler!

    Tipp: vll ist es die Variable (uint16_t) versuch mal einfach ne andere.
    vll bringts ja was

    gruß

  3. #3
    Moderator Robotik Visionär Avatar von radbruch
    Registriert seit
    27.12.2006
    Ort
    Stuttgart
    Alter
    61
    Beiträge
    5.799
    Blog-Einträge
    8
    Hallo,

    sind etwas "dürftig" deine Codeschnippsel.

    uint16_t zahler(void) definiert so eine Funktion und müsste wenigstens noch ein {[Körper]} besitzen, uint16_t zahler; würde ein Variable deklarieren.

    Datentyp von e?

    Gruß

    mic
    Bild hier  
    Atmel’s products are not intended, authorized, or warranted for use
    as components in applications intended to support or sustain life!

  4. #4
    Erfahrener Benutzer Roboter Experte
    Registriert seit
    04.01.2008
    Alter
    31
    Beiträge
    540
    was meinste mit körper? e ist eine dec-zahl

  5. #5
    Moderator Robotik Visionär Avatar von radbruch
    Registriert seit
    27.12.2006
    Ort
    Stuttgart
    Alter
    61
    Beiträge
    5.799
    Blog-Einträge
    8
    Hallo

    Da aus deinen Schnippseln nicht erkennbar ist was "zahler" sein soll, gehe ich mal von zwei Möglichkeiten aus:

    Eine Funktion mit 16-Bit Rückgabewert:

    uint16_t zahler(void)
    {
    // Körper der Funktion
    return(0);
    }

    oder ein vorzeichenloser 16-Bit-Wert:

    uint16_t zahler;

    Autoincrement/-decrement geht nicht mit speziellen Datentypen. Da es wohl ein Geheimniss ist, wie der Datentyp "dec" aussieht, kann ich da nicht helfen. Ansonsten wäre die Deklaration von e hilfreich.

    Gruß

    mic
    Bild hier  
    Atmel’s products are not intended, authorized, or warranted for use
    as components in applications intended to support or sustain life!

  6. #6
    Erfahrener Benutzer Roboter Experte
    Registriert seit
    04.01.2008
    Alter
    31
    Beiträge
    540
    ich sende einfach mal den ganzen text und die fehlermeldung:




    Uncommented Version of RP6Base_Move_05.c!
    // written by Dominik S. Herwald
    // ------------------------------------------------------------------------------------------


    #include "RP6RobotBaseLib.h"


    #define IDLE 0

    typedef struct {
    uint8_t speed_left;
    uint8_t speed_right;
    unsigned dir:2;
    unsigned move:1;
    unsigned rotate:1;
    uint16_t move_value;
    uint8_t state;
    } behaviour_command_t;

    behaviour_command_t STOP = {0, 0, FWD, false, false, 0, IDLE};


    #define CRUISE_SPEED_FWD 100

    #define MOVE_FORWARDS 1
    behaviour_command_t cruise = {CRUISE_SPEED_FWD, CRUISE_SPEED_FWD, FWD,
    false, false, 0, MOVE_FORWARDS};


    uint32_t behaviour_cruise(void)
    {
    return 0;
    }



    #define ESCAPE_SPEED_BWD 100
    #define ESCAPE_SPEED_ROTATE 60

    #define ESCAPE_FRONT 1
    #define ESCAPE_FRONT_WAIT 2
    #define ESCAPE_LEFT 3
    #define ESCAPE_LEFT_WAIT 4
    #define ESCAPE_RIGHT 5
    #define ESCAPE_RIGHT_WAIT 6
    #define ESCAPE_WAIT_END 7
    behaviour_command_t escape = {0, 0, FWD, false, false, 0, IDLE};

    #define a 0
    #define b 0
    #define c 0


    uint32_t behaviour_escape(void)
    {
    static uint8_t bump_count = 0;

    switch(escape.state)
    {
    case IDLE:
    break;
    case ESCAPE_FRONT:
    c++; escape.speed_left = ESCAPE_SPEED_BWD;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 220;
    else
    escape.move_value = 160;
    escape.state = ESCAPE_FRONT_WAIT;
    bump_count+=2;
    break;
    case ESCAPE_FRONT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    if(bump_count > 3)
    {
    escape.move_value = 100;
    escape.dir = RIGHT;
    bump_count = 0;
    }
    else
    {
    escape.dir = LEFT;
    escape.move_value = 70;
    }
    escape.rotate = true;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_LEFT:
    b++;
    escape.speed_left = ESCAPE_SPEED_BWD;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 190;
    else
    escape.move_value = 150;
    escape.state = ESCAPE_LEFT_WAIT;
    bump_count++;
    break;
    case ESCAPE_LEFT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    escape.dir = LEFT;
    escape.rotate = true;
    if(bump_count > 3)
    {
    escape.move_value = 110;
    bump_count = 0;
    }
    else
    escape.move_value = 80;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_RIGHT:
    a++;
    escape.speed_left = ESCAPE_SPEED_BWD ;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 190;
    else
    escape.move_value = 150;
    escape.state = ESCAPE_RIGHT_WAIT;
    bump_count++;
    break;
    case ESCAPE_RIGHT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    escape.dir = RIGHT;
    escape.rotate = true;
    if(bump_count > 3)
    {
    escape.move_value = 110;
    bump_count = 0;
    }
    else
    escape.move_value = 80;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_WAIT_END:
    if(!(escape.move || escape.rotate))
    escape.state = IDLE;
    break;
    }
    return 0;
    }


    void bumpersStateChanged(void)
    {
    if(bumper_left && bumper_right)
    {
    escape.state = ESCAPE_FRONT;

    }
    else if(bumper_left)

    {

    if(escape.state != ESCAPE_FRONT_WAIT)
    escape.state = ESCAPE_LEFT;

    }
    else if(bumper_right)

    {

    if(escape.state != ESCAPE_FRONT_WAIT)
    escape.state = ESCAPE_RIGHT;
    }
    }


    #define AVOID_SPEED_L_ARC_LEFT 30
    #define AVOID_SPEED_L_ARC_RIGHT 90
    #define AVOID_SPEED_R_ARC_LEFT 90
    #define AVOID_SPEED_R_ARC_RIGHT 30

    #define AVOID_SPEED_ROTATE 60

    #define AVOID_OBSTACLE_RIGHT 1
    #define AVOID_OBSTACLE_LEFT 2
    #define AVOID_OBSTACLE_MIDDLE 3
    #define AVOID_OBSTACLE_MIDDLE_WAIT 4
    #define AVOID_END 5

    behaviour_command_t avoid = {0, 0, FWD, false, false, 0, IDLE};

    #define d 0
    #define e 0
    #define f 0

    uint32_t behaviour_avoid(void)
    {
    static uint8_t last_obstacle = LEFT;
    static uint8_t obstacle_counter = 0;
    switch(avoid.state)
    {
    case IDLE:
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;

    else if(obstacle_left)
    avoid.state = AVOID_OBSTACLE_LEFT;

    else if(obstacle_right)
    avoid.state = AVOID_OBSTACLE_RIGHT;

    break;
    case AVOID_OBSTACLE_MIDDLE:
    f++;
    avoid.dir = last_obstacle;
    avoid.speed_left = AVOID_SPEED_ROTATE;
    avoid.speed_right = AVOID_SPEED_ROTATE;
    if(!(obstacle_left || obstacle_right))
    {
    if(obstacle_counter > 3)
    {
    obstacle_counter = 0;
    setStopwatch4(0);
    }
    else
    setStopwatch4(400);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    break;
    case AVOID_OBSTACLE_RIGHT:
    d++;
    avoid.dir = FWD;
    avoid.speed_left = AVOID_SPEED_L_ARC_LEFT;
    avoid.speed_right = AVOID_SPEED_L_ARC_RIGHT;
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;
    if(!obstacle_right)
    {
    setStopwatch4(500);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    last_obstacle = RIGHT;
    obstacle_counter++;
    break;
    case AVOID_OBSTACLE_LEFT:
    e++;
    avoid.dir = FWD;
    avoid.speed_left = AVOID_SPEED_R_ARC_LEFT;
    avoid.speed_right = AVOID_SPEED_R_ARC_RIGHT;
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;
    if(!obstacle_left)
    {
    setStopwatch4(500);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    last_obstacle = LEFT;
    obstacle_counter++;
    break;
    case AVOID_END:
    if(getStopwatch4() > 1000)
    {
    stopStopwatch4();
    setStopwatch4(0);
    avoid.state = IDLE;
    }
    break;
    }
    }

    void acsStateChanged(void)
    {
    if(obstacle_left && obstacle_right)
    statusLEDs.byte = 0b100100;
    else
    statusLEDs.byte = 0b000000;
    statusLEDs.LED5 = obstacle_left;
    statusLEDs.LED4 = (!obstacle_left);
    statusLEDs.LED2 = obstacle_right;
    statusLEDs.LED1 = (!obstacle_right);
    updateStatusLEDs();
    }

    void moveCommand(behaviour_command_t * cmd)
    {
    if(cmd->move_value > 0)
    {
    if(cmd->rotate)
    rotate(cmd->speed_left, cmd->dir, cmd->move_value, false);
    else if(cmd->move)
    move(cmd->speed_left, cmd->dir, DIST_MM(cmd->move_value), false);
    cmd->move_value = 0;
    }
    else if(!(cmd->move || cmd->rotate))
    {
    changeDirection(cmd->dir);
    moveAtSpeed(cmd->speed_left,cmd->speed_right);
    }
    else if(isMovementComplete())
    {
    cmd->rotate = false;
    cmd->move = false;
    }
    }

    void behaviourController(void)
    {

    behaviour_cruise();
    behaviour_avoid();
    behaviour_escape();

    if(escape.state != IDLE)
    moveCommand(&escape);
    else if(avoid.state != IDLE)
    moveCommand(&avoid);
    else if(cruise.state != IDLE)
    moveCommand(&cruise);
    else
    moveCommand(&STOP);
    }

    uint16_t zahler(void)
    while (true){
    writeString("Hindernis Rechts:");
    writeInteger(d, DEC);
    writeString("\n");
    writeString("Hindernis Links:");
    writeInteger(e, DEC);
    writeString("\n");
    writeString("Hindernis Mitte:");
    writeInteger(f, DEC);
    writeString("\n");
    writeString("Kollision Rechts:");
    writeInteger(a, DEC);
    writeString("\n");
    writeString("Kollision Links:");
    writeInteger(b, DEC);
    writeString("\n");
    writeString("Kollision Mitte:");
    writeInteger(c, DEC);
    writeString("\n");
    mSleep(10000);





    int main(void)
    {
    initRobotBase();
    setLEDs(0b111111);
    mSleep(2500);
    setLEDs(0b100100);

    BUMPERS_setStateChangedHandler(bumpersStateChanged );

    ACS_setStateChangedHandler(acsStateChanged);

    powerON();
    setACSPwrLow();

    while(true)
    {
    behaviourController();
    task_RP6System();
    zahler();
    }
    return 0;
    }


    alles rote wurde mit der fehlermeldung kommentiert:error: invalid lvalue in increment



    ich hoffe, ihr findet einen fehler!

    vielen dank im voraus!

    roboman

  7. #7
    Neuer Benutzer Öfters hier
    Registriert seit
    06.01.2008
    Beiträge
    27
    was er damit sagen will ist das du das "()" weglassen musst wenn du eine einfache variable haben willst

    es reicht mit uint16_t zaehler;

    ohne die klammern

  8. #8
    Neuer Benutzer Öfters hier
    Registriert seit
    06.01.2008
    Beiträge
    27
    also erstmal: dreckig geloffen! jetz muss ich nochmal nen post machen
    naja dummer zufall eben

    zu grün: du hast die "Variablen" mit define erstellt da kann man meiner meinung nach nicht inkrementieren.

    zu rot: siehe oben bzw. lass dass "(void)" weg

  9. #9
    Erfahrener Benutzer Roboter Experte
    Registriert seit
    04.01.2008
    Alter
    31
    Beiträge
    540
    und was muss ich machen, um sie inkrementieren zu können?

  10. #10
    Neuer Benutzer Öfters hier
    Registriert seit
    06.01.2008
    Beiträge
    27
    mach die "Variablen" einfach als echte variablen: int16_t zum beispiel

    wenn dir des zuviel platz braucht kannst du in der documentation vom rp6 noch weitere typen rausgreifen. inkrementieren kannst du einfach mit a++,b++ ..... wie gehabt:


    Code:
    Uncommented Version of RP6Base_Move_05.c!
    // written by Dominik S. Herwald
    // ------------------------------------------------------------------------------------------
    
    
    #include "RP6RobotBaseLib.h"
    
    
    #define IDLE 0
    
    typedef struct {
    uint8_t speed_left;
    uint8_t speed_right;
    unsigned dir:2;
    unsigned move:1;
    unsigned rotate:1;
    uint16_t move_value;
    uint8_t state;
    } behaviour_command_t;
    
    behaviour_command_t STOP = {0, 0, FWD, false, false, 0, IDLE};
    
    
    #define CRUISE_SPEED_FWD 100
    
    #define MOVE_FORWARDS 1
    behaviour_command_t cruise = {CRUISE_SPEED_FWD, CRUISE_SPEED_FWD, FWD,
    false, false, 0, MOVE_FORWARDS};
    
    
    uint32_t behaviour_cruise(void)
    {
    return 0;
    }
    
    
    
    #define ESCAPE_SPEED_BWD 100
    #define ESCAPE_SPEED_ROTATE 60
    
    #define ESCAPE_FRONT 1
    #define ESCAPE_FRONT_WAIT 2
    #define ESCAPE_LEFT 3
    #define ESCAPE_LEFT_WAIT 4
    #define ESCAPE_RIGHT 5
    #define ESCAPE_RIGHT_WAIT 6
    #define ESCAPE_WAIT_END 7
    behaviour_command_t escape = {0, 0, FWD, false, false, 0, IDLE};
    
    int16_t a = 0;
    int16_t b = 0;
    int16_t c = 0;
    
    
    uint32_t behaviour_escape(void)
    {
    static uint8_t bump_count = 0;
    
    switch(escape.state)
    {
    case IDLE:
    break;
    case ESCAPE_FRONT:
    c++; escape.speed_left = ESCAPE_SPEED_BWD;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 220;
    else
    escape.move_value = 160;
    escape.state = ESCAPE_FRONT_WAIT;
    bump_count+=2;
    break;
    case ESCAPE_FRONT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    if(bump_count > 3)
    {
    escape.move_value = 100;
    escape.dir = RIGHT;
    bump_count = 0;
    }
    else
    {
    escape.dir = LEFT;
    escape.move_value = 70;
    }
    escape.rotate = true;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_LEFT:
    b++;
    escape.speed_left = ESCAPE_SPEED_BWD;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 190;
    else
    escape.move_value = 150;
    escape.state = ESCAPE_LEFT_WAIT;
    bump_count++;
    break;
    case ESCAPE_LEFT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    escape.dir = LEFT;
    escape.rotate = true;
    if(bump_count > 3)
    {
    escape.move_value = 110;
    bump_count = 0;
    }
    else
    escape.move_value = 80;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_RIGHT:
    a++;
    escape.speed_left = ESCAPE_SPEED_BWD ;
    escape.dir = BWD;
    escape.move = true;
    if(bump_count > 3)
    escape.move_value = 190;
    else
    escape.move_value = 150;
    escape.state = ESCAPE_RIGHT_WAIT;
    bump_count++;
    break;
    case ESCAPE_RIGHT_WAIT:
    if(!escape.move)
    {
    escape.speed_left = ESCAPE_SPEED_ROTATE;
    escape.dir = RIGHT;
    escape.rotate = true;
    if(bump_count > 3)
    {
    escape.move_value = 110;
    bump_count = 0;
    }
    else
    escape.move_value = 80;
    escape.state = ESCAPE_WAIT_END;
    }
    break;
    case ESCAPE_WAIT_END:
    if(!(escape.move || escape.rotate))
    escape.state = IDLE;
    break;
    }
    return 0;
    }
    
    
    void bumpersStateChanged(void)
    {
    if(bumper_left && bumper_right)
    {
    escape.state = ESCAPE_FRONT;
    
    }
    else if(bumper_left)
    
    {
    
    if(escape.state != ESCAPE_FRONT_WAIT)
    escape.state = ESCAPE_LEFT;
    
    }
    else if(bumper_right)
    
    {
    
    if(escape.state != ESCAPE_FRONT_WAIT)
    escape.state = ESCAPE_RIGHT;
    }
    }
    
    
    #define AVOID_SPEED_L_ARC_LEFT 30
    #define AVOID_SPEED_L_ARC_RIGHT 90
    #define AVOID_SPEED_R_ARC_LEFT 90
    #define AVOID_SPEED_R_ARC_RIGHT 30
    
    #define AVOID_SPEED_ROTATE 60
    
    #define AVOID_OBSTACLE_RIGHT 1
    #define AVOID_OBSTACLE_LEFT 2
    #define AVOID_OBSTACLE_MIDDLE 3
    #define AVOID_OBSTACLE_MIDDLE_WAIT 4
    #define AVOID_END 5
    
    behaviour_command_t avoid = {0, 0, FWD, false, false, 0, IDLE};
    
    #define d 0
    #define e 0
    #define f 0
    
    uint32_t behaviour_avoid(void)
    {
    static uint8_t last_obstacle = LEFT;
    static uint8_t obstacle_counter = 0;
    switch(avoid.state)
    {
    case IDLE:
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;
    
    else if(obstacle_left)
    avoid.state = AVOID_OBSTACLE_LEFT;
    
    else if(obstacle_right)
    avoid.state = AVOID_OBSTACLE_RIGHT;
    
    break;
    case AVOID_OBSTACLE_MIDDLE:
    f++;
    avoid.dir = last_obstacle;
    avoid.speed_left = AVOID_SPEED_ROTATE;
    avoid.speed_right = AVOID_SPEED_ROTATE;
    if(!(obstacle_left || obstacle_right))
    {
    if(obstacle_counter > 3)
    {
    obstacle_counter = 0;
    setStopwatch4(0);
    }
    else
    setStopwatch4(400);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    break;
    case AVOID_OBSTACLE_RIGHT:
    d++;
    avoid.dir = FWD;
    avoid.speed_left = AVOID_SPEED_L_ARC_LEFT;
    avoid.speed_right = AVOID_SPEED_L_ARC_RIGHT;
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;
    if(!obstacle_right)
    {
    setStopwatch4(500);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    last_obstacle = RIGHT;
    obstacle_counter++;
    break;
    case AVOID_OBSTACLE_LEFT:
    e++;
    avoid.dir = FWD;
    avoid.speed_left = AVOID_SPEED_R_ARC_LEFT;
    avoid.speed_right = AVOID_SPEED_R_ARC_RIGHT;
    if(obstacle_right && obstacle_left)
    avoid.state = AVOID_OBSTACLE_MIDDLE;
    if(!obstacle_left)
    {
    setStopwatch4(500);
    startStopwatch4();
    avoid.state = AVOID_END;
    }
    last_obstacle = LEFT;
    obstacle_counter++;
    break;
    case AVOID_END:
    if(getStopwatch4() > 1000)
    {
    stopStopwatch4();
    setStopwatch4(0);
    avoid.state = IDLE;
    }
    break;
    }
    }
    
    void acsStateChanged(void)
    {
    if(obstacle_left && obstacle_right)
    statusLEDs.byte = 0b100100;
    else
    statusLEDs.byte = 0b000000;
    statusLEDs.LED5 = obstacle_left;
    statusLEDs.LED4 = (!obstacle_left);
    statusLEDs.LED2 = obstacle_right;
    statusLEDs.LED1 = (!obstacle_right);
    updateStatusLEDs();
    }
    
    void moveCommand(behaviour_command_t * cmd)
    {
    if(cmd->move_value > 0)
    {
    if(cmd->rotate)
    rotate(cmd->speed_left, cmd->dir, cmd->move_value, false);
    else if(cmd->move)
    move(cmd->speed_left, cmd->dir, DIST_MM(cmd->move_value), false);
    cmd->move_value = 0;
    }
    else if(!(cmd->move || cmd->rotate))
    {
    changeDirection(cmd->dir);
    moveAtSpeed(cmd->speed_left,cmd->speed_right);
    }
    else if(isMovementComplete())
    {
    cmd->rotate = false;
    cmd->move = false;
    }
    }
    
    void behaviourController(void)
    {
    
    behaviour_cruise();
    behaviour_avoid();
    behaviour_escape();
    
    if(escape.state != IDLE)
    moveCommand(&escape);
    else if(avoid.state != IDLE)
    moveCommand(&avoid);
    else if(cruise.state != IDLE)
    moveCommand(&cruise);
    else
    moveCommand(&STOP);
    }
    
    uint16_t zahler
    while (true){
    writeString("Hindernis Rechts:");
    writeInteger(d, DEC);
    writeString("\n");
    writeString("Hindernis Links:");
    writeInteger(e, DEC);
    writeString("\n");
    writeString("Hindernis Mitte:");
    writeInteger(f, DEC);
    writeString("\n");
    writeString("Kollision Rechts:");
    writeInteger(a, DEC);
    writeString("\n");
    writeString("Kollision Links:");
    writeInteger(b, DEC);
    writeString("\n");
    writeString("Kollision Mitte:");
    writeInteger(c, DEC);
    writeString("\n");
    mSleep(10000);
    
    
    
    
    
    int main(void)
    {
    initRobotBase();
    setLEDs(0b111111);
    mSleep(2500);
    setLEDs(0b100100);
    
    BUMPERS_setStateChangedHandler(bumpersStateChanged);
    
    ACS_setStateChangedHandler(acsStateChanged);
    
    powerON();
    setACSPwrLow();
    
    while(true)
    {
    behaviourController();
    task_RP6System();
    zahler();
    }
    return 0;
    }
    bitte beachte das die zeile
    Code:
    uint16_t zaehler;
    nur die variable zaehler initialisiert, d.h. rp6 weis das die variable existiert!!

Seite 1 von 3 123 LetzteLetzte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

12V Akku bauen