|
Oh gawd, fortunately this isn't in an interrupt. The complexity of screen updates alone would sort of preclude it, as I'd hate to load all the supporting code permanently into RAM. It's an entire UI/UX framework, and while relatively small, targeting IoT, it's a heck of a lot more than you'd want to stuff in an interrupt routine.
That means I have wiggle room.
The reason I need the state machine is for example, if I'm doing cooperative threading by interleaving graphics and sound tasks, both of which need to update as often as possible. This way I can do partial screen updates and partial sound buffer updates for example, without anything getting hung up and buffers emptying or frames dropping - that sort of thing.
Check out my IoT graphics library here:
https://honeythecodewitch/gfx
|
|
|
|
|
Matthew Dennis wrote: an interrupt driven state machine for fast, tiny code. Doesn't "fast, tiny" imply limited use ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Yes and no,
The code to drive the state machine is fairly generic, but the tables of states and transitions are specific to the application.
In my case, I was using it to use a MC6301 or MC6805 with < 128B of RAM, including stack, and < 2K ROM to bit bang a 1200 Baud serial port and drive 2 slip printers, motors and pin, and 4 fonts.
A state machine is extremely fast and robust and very easy to understand and debug.
It was tight and I even ended up using an unused interrupt vector or two for code space.
"Mistakes are prevented by Experience. Experience is gained by making mistakes."
|
|
|
|
|
honey the codewitch wrote: Don't you just love those nasty, snarly problems that become a time sink, sometimes for months, sometimes being shelved for a year before picking it back up later and trying again?
Nope.
For the systems I work on...
There are problems which require a simple fix but which takes a long time to find the source of the problem. Those are not too bad.
But other problems can often resolve to the following
1. The architecture is the problem. Perhaps nothing wrong with it when it was created but the business has expanded any now there is no way to fix it without a complete refactor.
2. The 'feature' was added adhoc using often nothing more than a verbal idea. And tested very little. Now it has grown with 'fixes' being added over time. Still very little testing. So now customers are having repeated 'bugs' with it even though there is no understanding of what it should be doing in the first place.
3. Actual known bug has been ignored for years and now customers are actually using it as a feature. Perhaps even in violation of their contract.
4. The very nature of the language/OS prevents a fix from being put into place.
|
|
|
|
|
In this case I'm not sure any of those would apply. It's a complicated algorithm on top of a well known common practice of using dirty rectangles. The complexity is due to limited memory.
This problem could easily be solved by AI using recognition to find clusters of controls that still fit within the given window, and things like that.
But it's just not simple otherwise.
Check out my IoT graphics library here:
https://honeythecodewitch/gfx
|
|
|
|
|
honey the codewitch wrote: Don't you just adore when you can see them coming and know what you're in for and what you're about to take on?
Nope, I particularly dread them. But there hasn't been such a problem that I can recall facing. I do fairly simple web development things. 
|
|
|
|
|
Eloquent !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Attempt the French partner (10)
Definition: Partner
Attempt: Stab
The French: le
partner: mate
Stablemate
Bit naughty using partner twice
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
pkfox wrote: Bit naughty Not really, but the clue should have included &lit - Wiktionary[^].
|
|
|
|
|
Attempt the French partner (10)
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
I think you will be up tomorrow - I got nothing!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
interesting given Russia has been at it awhile. Testing drill bits?
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Bloomberg wrote: The drilling is expected to take 457 days. That's very specific. A bit of opportunity for under-/over-achievement!
Bloomberg wrote: ... a depth of 12,262 meters ... after 20 years of drilling. ... and also looks a tad optimistic based on this previous hole!
Now when they can drill through from one side to the other: that's when we really need to worry.
|
|
|
|
|
The poor planet will cry enough at some point
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
And its tears will burn everything on their way
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
"Such work can identify mineral and energy resources and help assess the risks of environmental disasters, such as earthquakes and volcano eruptions."
or hit a magma pocket and cause a volcano... I seem to recall a cheesy sci-fi film about this...
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
They're due in St. Louis in 2 weeks?
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Hope it doesn't come through my basement when I'm working from home (In St. Louis). I'll keep you posted if it does.
Hogan
|
|
|
|
|
Good luck.
As a side note you'll never have to worry about basement flooding!
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Mike Hankey wrote: never have to worry about basement flooding!
Lava, OTOH...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
You live in St. Louis, Hawaii?
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
No. In Modi'in, Israel.
The local politics and security situation are already volcanic enough, thank you. We don't need the geological situation to deteriorate, as well. 😰
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Yes, I've been reading there's been an escalation in the conflict.
Good luck, stay safe!
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Order me a kung pao bat when you see them come through...
Will Rogers never met me.
|
|
|
|