Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
#include "sys/axon.h"#include "servoPWM.h"#include "a2d.h"//user includes#include "kinematics.c" //SoR Biped Engine// Define sensors#define gyro_X ADC_NUMBER_TO_CHANNEL(0)#define gyro_Y ADC_NUMBER_TO_CHANNEL(1)//snip
//initialize variablesint16_t r1L;int16_t r2L;int16_t r4L;//snip
../kinematics.c:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'r1L'../kinematics.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'r2L'../kinematics.c:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'r4L'
//initialize variableslong signed int r1L;long signed int r2L;long signed int r4L;
uint16_t counter;
#include <stdint.h>
Try renaming kinematics.c to kinematics.h and then including this h file rather than the c file.Its not good practice to include another C file. The effects are probably undefined and in this case it 'forgets' all the includes from your main file and so 'int16_t' etc are no longer defined and hence the compile error. If its a 'h' file then all is okNb this is a compiler issue/feature not my lib