add motors emulation

This commit is contained in:
2026-08-11 16:53:11 +03:00
parent 25d35e2294
commit a996bae853
12 changed files with 165 additions and 39 deletions

View File

@@ -142,6 +142,7 @@ void serverproc(SSL_CTX *ctx, int fd){
//char buf[64];
//int P = 0;
while(isrunning){
motors_process();
/*double tnow = sl_dtime();
if(tnow - t0 > 5. && nfd > 1){ // broadcasting message
//DBG("send ping");
@@ -271,6 +272,11 @@ sl_sock_hresult_e speed_handler(int _U_ index, char _U_ value[SL_VAL_LEN]){
return RESULT_SILENCE;
}
sl_sock_hresult_e stop_handler(int _U_ index, char _U_ value[SL_VAL_LEN]){
motors_stop();
return RESULT_OK;
}
// binary search handler by name
static int search_handler(const char *name){
int low = 0;