Comments (7)
The more detailed the context, the better.
Which firmware are you using? one modified by you?
This indicates that it is running in a ESP32:
I (27) boot: ESP-IDF v4.3.1 2nd stage bootloader
This indicates that it is running in a PC:
Platform: PC Debug
So, that's weird...
Also, from where are you calling uni_gamepad_dump()
?
from bluepad32.
I set the platform to PC_ Debug,and change some GPIO pin maping, to test xboxone controller.
using the original uni_platform_pc_debug. c file.So far,it work fine if I comment out uni_gamepad_dump funtion.
maybe UART TX cause the problem?
from bluepad32.
I wouldn't know... testing the pc_debug
platform in ESP32 is not tested...
Look at the ISR code... seems that you might be calling uni_dump_gamepad
from there... and that most probably trigger the watchdog...
closing bug since this is not a Bluepad32 bug.
For future reference, post the entire code... will help me understand better the context
from bluepad32.
For example, print log in function "pcdebug_on_gamepad_data"
I found that the problem was caused by print log.If log length exceeds 92 characters, it will certainly appear.
This is my first time using esp32,I am learning,and can't find the reason.If my usage is wrong, please correct it, thank you!
.............................................
............................................
static void pc_debug_on_gamepad_data(uni_hid_device_t* d, uni_gamepad_t* gp) {
UNUSED(d);
static uni_gamepad_t prev = {0};
if (memcmp(&prev, gp, sizeof(*gp)) == 0) {
return;
}
prev = *gp;
logi("(0x%02x),dpad=0x%02x, x=%d, y=%d, rx=%d, ry=%d, brake=%d, accel=%d, buttons=0x%08x, misc=0x%02x\n",
gp->updated_states, // state
gp->dpad, gp->axis_x, gp->axis_y, gp->axis_rx, gp->axis_ry, // axis
gp->brake, gp->throttle, gp->buttons, gp->misc_buttons // misc
);
.............................................
.............................................
from bluepad32.
How familiar are you with microcontrollers?
From your first comment where you pasted the error:
Core 0 was running in ISR context:
EPC1 : 0x400d3aef EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x400877e3
0x400d3aef: uart_hal_write_txfifo at D:/Desktop/esp-idf/components/hal/uart_hal_iram.c:35
It seems that the ESP32 is sending (printing) to the console inside a ISR (Interrupt Service Routine).
What ever you put in a ISR must be super fast.
Printing a few lines to the console might be Ok... but dumping the gamepad state for each packet received is not...
Long story short: don't dump the gamepad data to the console
from bluepad32.
I've only used 51 and arm before,with no os.
Now I understand a little,The freeRTOS.Thanks
By the way, Xbox controllers are sometimes very difficult to connect, whether you restart esp32 or the controller or press the sync butn.But sometimes it's very easy to connect. I tried to find out the reason,but it's too difficuilt to me now.
from bluepad32.
yep... Xbox controllers are kind of flaky... just make sure that you are using Bluepad32 v3.0.0 (or newer)... Xbox connection was improved in that version ... although not as reliable as DualShock or Nintendo's controllers
from bluepad32.
Related Issues (20)
- issue with another library HOT 6
- Type in Arduino build description? HOT 1
- 8BitDo SFC30 swap button ports HOT 12
- Can't swap joy port with 8BitDo controllers that don't have Menu-button HOT 1
- [Feature Request] Add enableNewBluetoothConnections to Arduino + Nina Lib HOT 7
- Xbox system button no longer works HOT 4
- Missing Defines HOT 7
- Xbox One X Controller firmware version 5.13.3143.0 HOT 4
- [Feature Request] Battery level/low battery status HOT 7
- [Feature Request] Programmatic controller disconnect. HOT 15
- [Feature Request] analogWrite for RGB LED HOT 3
- Gamepad connect but not working. HOT 4
- [Feature Request] Configurable buttons mappings via Bluetooth HOT 17
- 8bitdo M30 and SFC30 and Amiga second fire button maps HOT 16
- How to know which button is being pressed? HOT 20
- Conflict with SerialBluetooth.h? HOT 4
- Platformio and BluePad32 HOT 4
- How to disconnect controller? HOT 16
- Add BTStack examples for Arduino IDE HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluepad32.