#include <canOpenDriver.h>
#include <can_ids.h>
+#define INLINE /* Empty */
+
/**
* @addtogroup leds
* @{
* @name Motor control (h8eurobot)
* @{
*/
-/* #define LED_ODO_SEND 0 */
-/* #define LED_CORR_TRIG 1 */
-/* #define LED_MAIN_LOOP 2 */
+/* #define LED_MAIN_LOOP 0 */
+/* #define LED_CORR_TRIG 2 */
+/* #define LED_ODO_SEND 3 */
#define LED_LIVE 0 /**< D1: Blinks once per second when software is alive */
#define LED_CAN_REC 1 /**< D2: Blinks when a CAN message is received:
* - 2ms for unknown message
/**
* Implementation of help command with watchdog
*/
-static inline char *skip_white(char *p)
+static INLINE char *skip_white(char *p)
{
while(isspace((__u8)*p)) p++;
return p;
} oddata[ODOMETRY_TABLE_SIZE];
#if 0
-static inline short sendOdometry()
+static INLINE short sendOdometry()
{
static short idxSend=0;
static short prevIdxRecive=0xff;
#endif
-static inline void blink_odo_send(void)
+static INLINE void blink_odo_send(void)
{
#ifdef LED_ODO_SEND
static bool led;
* Sends only pxms_ap. Odometry is calculated elsewhere and since we
* don't send differences, sequence numbers are not necessary.
*/
-static inline void sendOdometrySimple()
+static INLINE void sendOdometrySimple()
{
/* If the variable is static, it is initialized to zero, so we don't have to initialize it all the time again. */
static Message m;
}
#if 0
-static inline short storeOdometryInTable()
+static INLINE short storeOdometryInTable()
{
/*FIXME: add detection of error when idxStore>idxRecive.*/
oddata[idxStore].dx=x;
#endif
-static inline void blink_err_led(void)
+static INLINE void blink_err_led(void)
{
#ifdef LED_ERROR
static bool err_led = false;
#endif
}
-static inline void handle_motor_errors() {
+static INLINE void handle_motor_errors() {
static unsigned last_msg_time=0;
int i;
pxmc_state_t *mcs;
#endif
}
-static inline void blink_corr_trig(void)
+static INLINE void blink_corr_trig(void)
{
#ifdef LED_CORR_TRIG
static bool led;
}
-static inline void handle_can_receive(void)
+static INLINE void handle_can_receive(void)
{
Message msg_rcv;
led_can_rec(0);
}
-static inline void handle_odometry_send()
+static INLINE void handle_odometry_send()
{
#define ODOMETRY_PERIOD 43
#define ODOMETRY_TIMEOUT (3*ODOMETRY_PERIOD)
}
}
-static inline void handle_status_send()
+static INLINE void handle_status_send()
{
static unsigned last_send_time=0;
Message m;
}
}
-static inline void blink_main_loop()
+static INLINE void blink_main_loop()
{
#ifdef LED_MAIN_LOOP
static bool led = false;
}
-static inline void handle_leds()
+static INLINE void handle_leds()
{
#define PERIOD 1000
static unsigned last=0;
if (runtime_display) {
//printf("c=%d idx=%d\n", test_counter, test_index);
//printf("ene=%d\n", mcs_left.pxms_ene);
- printf("rs=%ld as=%ld\n", mcs_left.pxms_rs, mcs_left.pxms_as);
+ //printf("rs=%ld as=%ld\n", mcs_left.pxms_rs, mcs_left.pxms_as);
}
} while (1);