#include "commands.h" void khepcc_set_speed(khep_state_t *st, int speed) { st->mot_l = speed * 6; st->mot_r = speed * 6; st->need_update = 1; } void khepcc_turn(khep_state_t *st, int val) { if ( st->mot_l == 0 ) { st->mot_l = -val * 3; st->mot_r = val * 3; } else { if ( val > 0 ) st->mot_l += -val * 3; else st->mot_r += val * 3; } st->need_update = 1; }