Zu dem Problem mit den Bumpern der Code
Es funktioniert leider noch nicht ob wohl ich im vergleich zum letzten mal task_MULTIIO_BUMPERS(); erweitert habe.Code:/*****************************************************************************/ // Includes: #include "RP6M256Lib.h" #include "RP6I2CmasterTWI.h" // I2C Master Library #include "RP6M256_I2CMasterLib.h" #include "RP6M256_LFSBumperLib.h" #include <string.h> /** * Bumpers Event handler */ void bumpersStateChanged(void) { if(bumper_left && bumper_right) { wifiControl.dir = FWD; wifiControl.speed_left = 0; wifiControl.speed_right = 0; clearPosLCD(3,0,16); setCursorPosLCD(3, 0); writeStringLCD_P("stop"); moveCommand(&wifiControl); } else if(bumper_left) { wifiControl.dir = FWD; wifiControl.speed_left = 0; wifiControl.speed_right = 0; clearPosLCD(3,0,16); setCursorPosLCD(3, 0); writeStringLCD_P("stop"); moveCommand(&wifiControl); } else if(bumper_right) { wifiControl.dir = FWD; wifiControl.speed_left = 0; wifiControl.speed_right = 0; clearPosLCD(3,0,16); setCursorPosLCD(3, 0); writeStringLCD_P("stop"); moveCommand(&wifiControl); } } // ... // int main(void) { initRP6M256(); initLCD();// IMPORTANT: lfsbumper_init(); // LFS & Bumper init!!! // --------------------------------------- I2CTWI_initMaster(100); I2CTWI_setRequestedDataReadyHandler(I2C_requestedDataReady); I2CTWI_setTransmissionErrorHandler(I2C_transmissionError); MULTIIO_BUMPERS_setStateChangedHandler(bumpersStateChanged); BUMPERS_setStateChangedHandler(bumpersStateChanged); // ... // while(true) { task_checkINT(); task_I2CTWI(); behaviourController(); //task_webserver(); task_MULTIIO_BUMPERS(); } return 0; }
Thorben W






Zitieren

Lesezeichen