|
They don't block. This is a hardware UART with internal send and receive buffers. I think that is my problem (maybe?).
The issue with scheduling on this RTOS is it's too simplistic and easy to starve. The scheduler isn't bright.
It's not CPU idling on I/O that is the problem, which punting to another thread would solve.
It's simply latency between the time the data gets received and it gets sent. My CPU is running like a greased pig.
Edit: I've got some hardware coming today which will hopefully allow me to switch all the MIDI stuff to USB. That may solve my problem by sidestepping the hardware UARTs altogether.
My other option is to just bit bang the serial myself, but I don't like that.
To err is human. Fortune favors the monsters.
|
|
|
|
|
I remember the UART buffering / lag problem! Sometimes these chips are too smart for their own good.
Back in the day, there was a bit one could set somehow that would disable the buffering at least on some UART's, we had to actually order specific manufacturer UART's - worked like a charm, except then I had to tie in the interrupt so not to overwrite the byte being sent, and that was flaky because, well, it was an interrupt, and changing interrupt priorities didn't really fix the problem. Since we were sending small packets of data, I ended up doing a "write byte", "check for TX complete loop", "write the next byte". But that was for writing. For reading, I didn't much care if it was laggy.
|
|
|
|
|
My first optimization would be putting "int i" outside the loop. But since I don't know C++, it maybe makes no difference.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
In this case it makes no difference to the compiler. It just basically gives the compiler a stack size and an offset, and it would have those no matter where it is in the code. "int i;" doesn't create any executable instructions.
To err is human. Fortune favors the monsters.
|
|
|
|
|
I'm looking at this one[^] but figure I'd ask here for tips, horror stories, etc.
And if you're wondering, normally I would just use a 10 speed bike, but we have HiLLs. Big ones.
|
|
|
|
|
I have a RadCity that I'm moderately happy with. It's way more bike than I deserve though.
Pros:
- the Rad bikes are relatively cheaper as you buy direct
- integrated rear rack
- hills are not much of an issue, unless you run out of juice (I do get about 70km off a charge, but I tend to only use the first level of power assist. It has 5)
Cons:
- you have to be fairly comfortable with putting it together yourself, or at least find a shop willing to do that
- I really should have got a step-through, as it's pretty high and can lead to my voice going higher
Whatnots:
- they are HEAVY - although that's pretty much all electric bikes. Don't live above the first floor, and you really don't want to ride it much without the motor.
- the throttle may make your bike unlawful, depending on jurisdiction
TTFN - Kent
|
|
|
|
|
Kent Sharkey wrote: I really should have got a step-through, as it's pretty high and can lead to my voice going higher
Isn't that what we used to call a girl's bike? So their skirts didn't ride up?
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
Yup, but they’re also good for old folks who have trouble swinging their leg that high.
And so my skirts don’t ride up.
TTFN - Kent
|
|
|
|
|
Yeah, my knee wouldn't bend far enough anymore either. I have trouble getting out of cars and trucks if I can't swing the door all the way open.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
Kent Sharkey wrote: my skirts don’t ride up. That's funny. The name "Sharkey" doesn't sound Scottish.
Software Zen: delete this;
|
|
|
|
|
I think the name is originally Irish, but my father is from Helensburgh
TTFN - Kent
|
|
|
|
|
Kent Sharkey wrote: I really should have got a step-through, as it's pretty high and can lead to my voice going higher
And thanks for the great feedback!
|
|
|
|
|
rather than edit my post, adding...
Looking at the bike you're thinking of, it seems pretty comparable to the RADs, but maybe better. I like the integration of the battery. This way, you're less likely to have someone kick off your battery (I've heard it happening with the RADs). Other specs might take a minmaxer to figure out which is better.
TTFN - Kent
|
|
|
|
|
If I was getting one (which I'm not .. yet), based on my experience with plain old bikes I'd get one with low-maintenance hub-gear and enclosed chain.
Also this particular variant seems to be lacking a luggage carrier on the back, and a proper rear light (reflector only, that's not legal to ride at night here, but maybe it is for you).
|
|
|
|
|
#Worldle #195 1/6 (100%)
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
Everybody in my part of the world can do this. But what about others?
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
|
DANG! It's currently unavailable!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
There are lots of these sorts of things around, and they're very cheap. I bought one that used Windows Notepad as the UI .
You started Notepad with the device plugged in. You hit a certain key sequence, and it emulated a keyboard typing into Notepad so it could display prompts. You then responded to prompts, setting options and such. I thought it was rather clever.
Software Zen: delete this;
|
|
|
|
|
I have a software that does it, it's called MouseJiggler and it doesn't even actually move the cursor on screen. I use it for the same reason.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
How dare you!! You Leslie'd me!! The Lounge[^]
Just kidding. No harm, no foul! It is indeed a great tune, and I had never heard it before either.
|
|
|
|
|
Sorry I've Covid and ain't thinking right.
Besides that it's so good it deserved reposting.
The most expensive tool is a cheap tool. Gareth Branwyn
JaxCoder.com
|
|
|
|
|
Sorry you're not feeling well and you're right it is a great song, valid for repost.
|
|
|
|
|
Great find! I wonder if they have it at the local karaoke bar?
Will Rogers never met me.
|
|
|
|
|
Imagine if you will sitting in a bar relaxing drinking an adult beverage of your choice.
In walks a fairly attractive woman with an entourage and a CD case tucked under her arm....ah karaoke must be getting ready to start.
After the whole troupe finds a table and gets their drinks the woman removes a CD from her case and strolls up to the DJ and hands the CD to the DJ.
Waiting her turn finally comes up and she goes to the mic, the music starts and the sound that emits from her is like a cat with it's balls being screwed in a vise. After a painful rendition of god only knows what she returns to her table where all her friends congratulate her on the wonderful job.
It's been 10 years since I've been in a bar...I don't miss karaoke!
The most expensive tool is a cheap tool. Gareth Branwyn
JaxCoder.com
|
|
|
|