|
Yes, I agree. Very impressive.
|
|
|
|
|
Thanks!
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: I'm thrilled. So you should be, that's a great image.
|
|
|
|
|
Thanks! I didn't design the image, but yeah, parsing and rendering it was not easy at first. It showed me a bunch of bugs I had in my code, so it was a godsend.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
That is very impressive - well done
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
|
|
|
|
|
Thank you
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I find an open source PDF viewer in Javascript: pdf.js,
but I want to remove the download button, is it easy to remove this download button?
diligent hands rule....
|
|
|
|
|
|
thanks for a million!
this is what I am looking for
diligent hands rule....
|
|
|
|
|
Working with an STM32 device and trying to implement program in c++. Every platform is a little different in the way it implements C++ so trying to learn the ins and outs on the STM32.
Been working on a simple Timer singleton class for the past 6 hours and it's been 2 steps forward and 1 back. Should be fairly easy but there were so many gotchas that made it very frustrating.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Sounds painful, but also like article material.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I'm probably old fashioned, but I don't find C++ that helpful when it comes to embedded work - stick to C and assembler is my preferred route.
The idea of embedded is to get the best performance out of limited resources (speed, memory and / or power) and the extra overhead of class based OOPs isn't necessarily a good idea. And it's way harder to keep an eye on memory management to ensure memory fragmentation doesn't rear its ugly head after 2 weeks of continual runtime ...
"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!
|
|
|
|
|
OriginalGriff wrote: I don't find C++ that helpful when it comes to embedded work
I disagree c++, I've used C++ on various platforms for years and never had a problem.
I find; code size comparable, speed acceptable (you can also mix c++ and assembler).
The Arduino platform uses c++ as it's major language and there are libraries for everything under the sun.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Forget classes. template and constexpr mean I can create faster/more efficient code in C++ than you can readily create in C.
You don't have to use features that generate overhead in C++. Zero overhead C++ is a thing.
Besides, Generic Programming > Object Oriented Programming anyway
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
Nah. template can be applied to functions as well as struct/class.
Warning - basic implementation details:
When your compiler sees a template instantiation it basically works like a mail merge for source code, but with typed inputs. It takes those inputs, and uses the template to determine what TEXTUAL output to produce. That C++ text output is then fed back to the compiler and fully parsed/compiled (some initial parsing is done on the preinstantiated template, but it's not fully processed by the compiler until instantiation).
That's the functionality of the template keyword. It's a source code generator.
Edit: I should add, with template you often create "throw away" types - they're never actually used at runtime, and the compiler generates no direct machine code output for them. I don't consider those to be actual structs/classes because they are never used. They are simply a way to cajole the compiler into doing things it wasn't designed for when C++ was dreamed up.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 5hrs 20mins ago.
|
|
|
|
|
I am on the opposite side (at work): forced to use C while I would use C++ instead.
As others suggested C++ follows the Zero-overhead principle[^].
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I use the C runtimes with C++ language features on embedded.
I avoid the STL and most of the C++ standard runtimes.
Why?
For the exact reasons you're running into - the C runtimes in general are far more consistent platform to platform.
Furthermore, The STL is not set up to use the heap responsibly on constrained systems. You will get heap frag and eventual crashes without creating your own custom allocators for everything.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: I avoid the STL and most of the C++ standard runtimes.
Ditto
I ran into problems because of basic stupidity on my part and trying to do something that I hadn't done before.
Responsible memory/resource management is crucial in all embedded languages.
I generally don't do dynamic memory allocation, just instantiate classes once. When I do need to do dynamic memory allocation I attempt to allocate blocks that are the same size to reduce fragmentation. When I can't do that I am very cautious to destroy when done with.
You can shoot just as big a hole in your foot using C as C++!
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
I guess I misunderstood some of your initial comment. I am not fully coffee'd yet.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
watch out for memory allocation. Project I was on 5+ years ago was burned with "new" and other items for memory allocation not being thread safe. There was a macro to define that fixed everything.
Charlie Gilley
“Microsoft is the virus..."
"the problem with socialism is that eventually you run out of other people's money"
|
|
|
|
|
Maiden upset by gut size (9)
(Posted at 09:00, but in a different universe) :InnocentWhistle:
"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!
|
|
|
|
|
Nice one
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
|
|
|
|
|
Just so you know I solved it
Magnitude
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 thought you had! Well done:
Maiden MAIDEN
upset by (anag)
gut GUT
size MAGNITUDE
"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!
|
|
|
|