#include <tucbot/tucbot.h>
 
void testImu_print(int16_t value, uint8_t digits);
void testImu(void);
int main(void);
 
void testImu_print(int16_t value, uint8_t digits) {
 
    int16_t temp_value  = value ;
    uint8_t temp_digits = digits;
 
    if ((temp_value < 0) && temp_digits) {
        temp_digits--;
        temp_value = -temp_value;
    }
    while (temp_digits) {
        temp_value/= 10;
        temp_digits--;
    }
 
    if (temp_value == 0) {
    } else if (value >= 0) {
        while (digits) {
            digits--;
        }
    } else {
        while (digits) {
            digits--;
        }
    }
}
 
void testImu(void) {
 
    uint8_t resolution;
 
    int16_t orientation_display;
    uint8_t countdown           = 0;
    uint8_t flag_redraw_menu    = 0xFF;
 
 
 
    while (1) {
        if (flag_redraw_menu) {
            flag_redraw_menu = 0x00;
 
            orientation_display = 0x7FFF; 
 
            
            lcdstr_p(PSTR(
"Imu  ###" "\xDF" "C ####" "\xDF"));
 
        }
 
 
 
 
            flag_redraw_menu = 0xFF;
            countdown = 0;
 
 
            
 
            
            switch (resolution) {
                    break;
 
                    break;
 
                    break;
 
                    break;
 
                default:
                    break;
            }
 
            
 
            
            }
 
            
 
            
 
            flag_redraw_menu = 0xFF;
            countdown = 0;
        }
 
        if (countdown) {
            countdown--;
        } else {
            countdown = 5;
 
            }
 
            }
 
            }
 
            }
        }
 
    }
}
 
int main (void) {
 
 
 
    testImu();
 
    return (0);
}
   
void leds_set(eLedMask bitmask, uint8_t bool)
Sets the selected leds on or off.
 
@ kImuGetAccelX
Definition: imu.h:289
 
@ kImuSetGyroResolution
Definition: imu.h:373
 
@ kImuGyroResolution250
Definition: imu.h:128
 
uint8_t imu_calibrate(void)
Sets the three offsets through simple bias estimation.
 
@ kImuGetGyroZ
Definition: imu.h:299
 
@ kImuGetAccelY
Definition: imu.h:294
 
@ kLedOn
constant (0xFF): turn leds on
Definition: leds.h:63
 
@ kLedRight
bit mask (0x04): right led
Definition: leds.h:46
 
@ kImuSetOrientation
Definition: imu.h:364
 
@ kImuSelectGyroscope
bit mask (0x04): angular velocities (16-bit)
Definition: imu.h:273
 
eImuSelectMask imu_changed(eImuSelectMask bitmask)
Indicates if new data changed the selected data blocks.
 
void int16tostr(void *out, int16_t number, uint8_t digits)
Converts an integer to a string and passes it to an output function.
 
@ kImuSelectAccelerometer
Definition: imu.h:267
 
@ kImuGetTemperature
Definition: imu.h:305
 
@ kImuGetGyroResolution
Definition: imu.h:322
 
@ kRequestContinuous
constant (3): request continuous updates
Definition: update.h:37
 
@ kLedMiddle
bit mask (0x08): middle led
Definition: leds.h:44
 
@ kLedOff
constant (0x00): turn leds off
Definition: leds.h:61
 
@ kImuGyroResolution500
Definition: imu.h:131
 
@ kImuGyroResolution1000
Definition: imu.h:134
 
void imu_set(eImuSet select, int16_t value)
Sets the selected value of the imu sensors.
 
void lcdclr(void)
Clears the display.
 
void lcdxy(uint8_t x, uint8_t y)
Moves the cursor to a postion on the display.
 
void imu_request(eImuSelectMask bitmask, eRequestType request)
Requests new data from the imu.
 
#define orientation
deprecated constant: see kLausTrackerGetSelfOrientation
Definition: backward.h:880
 
int16_t imu_get(eImuGet select)
Returns the last stored version of the selected value.
 
@ kImuGetOrientation
Definition: imu.h:285
 
void lcdstr_p(const char *send_data)
Writes a string located in the flash to the display.
 
void lcdout(uint8_t data)
Writes one byte to the display.
 
void init_tucbot(uint8_t enable_interrupts)
Initiates the TUC-Bot.
 
void mdelay(uint16_t mseconds)
Waits for the given time in milliseconds.
 
@ kImuSelectAll
bit mask (0x07): select all data blocks
Definition: imu.h:275
 
@ kImuGyroResolution2000
Definition: imu.h:137
 
@ kImuSelectTemperature
Definition: imu.h:270