Diese Sektion erlaubt es ihnen alle Beiträge dieses Mitglieds zu sehen. Beachten sie, dass sie nur solche Beiträge sehen können, zu denen sie auch Zugriffsrechte haben.
int fu_light = 0;
int fu_Motor = 0;
int fu_richtung = 0;
unsigned int tcb;
void tx_timer_fu(void){
tx_fu(fu_light, fu_Motor, fu_richtung);
}
void tx_fu(int licht, int Motor, int richtung){
int mb0;
int mb1;
int mb2;
int mb3;
mb0 = Motor%2;
mb1 = (Motor>>1)%2;
mb2 = (Motor>>2)%2;
mb3 = (Motor>>3)%2;
test_cmd.data[0] = 0;
test_cmd.data[1] = 0x12;
test_cmd.data[2] = 0x30;
test_cmd.data[3] = 0;
test_cmd.data[4] = 0;
test_cmd.data[5] = mb3*17;
test_cmd.data[6] = mb2*17;
test_cmd.data[7] = mb1*17;
test_cmd.data[8] = mb0*17;
test_cmd.data[9] = 0;
test_cmd.data[10] = 0;
test_cmd.data[11] = 0;
test_cmd.data[12] = 0;
test_cmd.data[13] = 0;
test_cmd.data[14] = 0;
test_cmd.data[15] = 0;
test_cmd.data[16] = 0;
test_cmd.data[17] = licht * 17;
test_cmd.data[18] = 0;
test_cmd.data[19] = licht * 17;
test_cmd.data[20] = 0;
test_cmd.data[21] = 0;
test_cmd.hi_border = 1;
test_cmd.lo_border = 4;
test_cmd.tval = 94;
test_cmd.len = 22;
test_cmd.pulselen[0] = 25;
test_cmd.pulselen[1] = 50;
test_cmd.pulselen[2] = 118;
test_cmd.pulselen[3] = 77;
test_cmd.pulselen[4] = 4045;
RAW_Send(0);
RAW_Stop();
}
void fu_strg(void){
setSpeed(SPEED_60);
fu_Motor = 0;
fu_light = 0;
tcb = addTimerCB(tx_timer_fu, 500);
startCB(tcb);
while (!KEY_Exit){
if (KEY_Up){
if (fu_Motor < 15)
fu_Motor++;
}
if (KEY_Down){
if (fu_Motor > 0)
fu_Motor--;
}
if (KEY_A){
fu_light = 1 - fu_light;
}
waitKeyUp();
}
removeTimerCB(tcb);
setSpeed(SPEED_30);
}
unsigned char inp[100];
unsigned int inp_len;
unsigned int z;
inp_len = serial_getc();
for (z=1;z<inp_len; z++){
info = serial_getc();
inp[z]=info;
}
inp[z+1]=0;
draw_string(0,18,(char*)inp,3,DRAW_PUT);