Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
This might be a good place for us to note down changes that you may need to make to your code to make it compatible with webbotlib V2.I'm having some compile issues which I think are related to definitions of uint8_t, uint16_t, DRIVE_SPEED and boolean. Does anyone know if these types have been removed/changed, and if so what they have changed too?Edit: I can see that webbot is still using the above mentioned types, so does anyone know what might cause a compile error coming from V1 to V2?
void uartComms(SchedulerData data, TICK_COUNT lastTime, TICK_COUNT overflow){ //***uart1***************************************************************** int ch = uartGetByte(UART0); if(ch != -1) { rprintf("\nGrabbed something: %d", ch); } scheduleJob(&uartComms, &data, lastTime, 200000);}
Grabbed something: -29952Grabbed something: -29952Grabbed something: -29952Grabbed something: -29952Grabbed something: -29952
I gave V2 a try last night. I ran into problems as direct access to the buffer was disabled, preventing me from flushing it to work around some not yet explained bugs.Webbot is aware of this issue, I'm just letting you know as it could be related to your problem.
// Existing routine to flush the receive bufferuartFlushReceiveBuffer(UART1);// Until I write a 'uartFlushTransmitBuffer' then usebufferFlush(uartGetTxBuffer(UART1));
void uartComms(SchedulerData data, TICK_COUNT lastTime, TICK_COUNT overflow){ int ch; //***blueUART**************************************************************** ch = uartGetByte(blueUART); if(ch != -1) { rprintf("\nSomething in blueUART: %d", ch); //remoteControl(blueUART, &motionsMgr); } //***uart1***************************************************************** ch = uartGetByte(uart1); if(ch != -1) { rprintf("\nSomething in uart1: %d", ch); //tuneSensor(uart1); } scheduleJob(&uartComms, &data, lastTime, 200000);}
Something in blueUART: -29952Something in blueUART: -29952Something in blueUART: -29952Something in blueUART: -29952Something in blueUART: -29952Something in blueUART: -29952