Trying to understand why this code is causing Deskhop to reboot? #244
Unanswered
danschwarz
asked this question in
Q&A
Replies: 2 comments
-
|
My best guess right now is that I'm trying to do too much too fast; in testing I will press RIGHT-CTRL m several times in sequence; perhaps I'm overrunning some buffer and crashing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Here's a version that creates the macro from HID key values directly, rather than doing an ASCII char to HID key conversion first. Doesn't make any difference to the end result; still crashes, unfortunately. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a macro feature for my own use - press a key combination (in this case, RIGHT-CTRL M) and DeskHop will output the macro text as a series of keystrokes to the active PC.
I know this goes against the security principles, but I need this for my use case, and I can trust myself, so I'm building it. Not intending to submit a PR unless there is demand.
The problem is that, after outputing the macro text as desired, the DeskHop reboots and reverts firmware to a prior version. The code must be doing something wrong to trigger that result.
Any suggestions as to what I'm doing wrong? I haven't written C code in a long time, so I don't rule out having overlooked an edge condition that causes a crash. I'm not sure what setup would be required to do stepwise debugging of DeskHop firmware - a third connected RP2040 in debug mode?
Thanks for your help!
Attached: diff patch of my code vs. current HEAD.
macro.patch
Beta Was this translation helpful? Give feedback.
All reactions