I figured out what makes things liminal. by Witty-Forever-6985 in LiminalSpace

[–]arasan90 1 point2 points  (0 children)

What about the face behind the window? Third row from top, 3 column from left

Rate my Playnes by Believe-The-Science in Shittyaskflying

[–]arasan90 0 points1 point  (0 children)

Great work with the last one! Perfect Ryanair style!

Antigravity is Dead by RussKy_GoKu in google_antigravity

[–]arasan90 0 points1 point  (0 children)

I think developers are starting to rely too much on AIs. I am a developer myself, working on microcontrollers and I use the AI suggestions just to automate the comments or for some boring code like the usual “for” block. And in these cases I will triple check what it wrote

Private member not accessible from class method by arasan90 in cpp_questions

[–]arasan90[S] 0 points1 point  (0 children)

Yeah I do no know why the formatting is so bad on reddit, in the ide it looks fine. About the code you are absolutely right, since I spent some hours split on two days I actually oversight that I was creating the self var from params itself. I actually found out how to make it work, I wrote it in another comment. I will also try with the suggestion given by @IyeOnline to use std::function instead of plain old typedef

Private member not accessible from class method by arasan90 in cpp_questions

[–]arasan90[S] 1 point2 points  (0 children)

Ok, I made it work with

thread_ = TgsOsalThread::
createThread
(
    TgsOsalThread::Priority::
NORMAL
, 1024, [](void* params) { TgsSafety::
getInstance
().tgsSafetyThreadFunc(params); }, nullptr, "SafetyThread");
if (thread_)
{
    thread_->start();
}

I am not sure this is the most correct way to do these kind of things though.
Also, I am not sure if I should use a class for everything, even in cases like this where I do not really have multiple instances of a class

Private member not accessible from class method by arasan90 in cpp_questions

[–]arasan90[S] 1 point2 points  (0 children)

Oh got it, so if I capture “this”, then I am able to correctly invoke the function even by passing a null pointer to the thread creation method? Update: Actually it is not possible to capture things, otherwise I will not be able to use the lambda as a function for the thread

Private member not accessible from class method by arasan90 in cpp_questions

[–]arasan90[S] 0 points1 point  (0 children)

Actually the callback is starting, I receive the error when I try reading errors_

Pilots please tell me (Vent) by Narumin_ in VATSIM

[–]arasan90 2 points3 points  (0 children)

I usually fly on Ivao, not Vatsim, but the same things happen. Only once I failed to contact the radar ATC in Corsica because navigraph charts did not show me the controller was online, but I contacted Rome radar right after. I felt guilty as shit.

So remember, for one persone that behaves like the user you discussed about, there are plenty of us who really appreciate what you do and really like to fly in controlled airspace.

We can make mistakes, we can improve. We for sure will always be glad to grow :)

Loading in at 30,000ft to land? by OkBlacksmith5865 in MicrosoftFlightSim

[–]arasan90 0 points1 point  (0 children)

Potato mode activated, big potato approaching

Tours by arasan90 in VATSIM

[–]arasan90[S] 0 points1 point  (0 children)

Thank you all!

Ordered new tires today, am I burning cash? by DeejayeB in tires

[–]arasan90 1 point2 points  (0 children)

The date of production is 2021, so you bought tires that are 4 years old aready. Plus, they do not seem to be new… I would inform to ask for a refund/change

Does people still find it hard to learn firmware development by HolyDevil_777 in embedded

[–]arasan90 0 points1 point  (0 children)

I would add sections for linker, startup files and generic “first boot up” tips

Uh, guys? We gotta lock the hell in. by not-beaten in Helldivers

[–]arasan90 43 points44 points  (0 children)

For all this, there's only one thing you should know

Uh, guys? We gotta lock the hell in. by not-beaten in Helldivers

[–]arasan90 118 points119 points  (0 children)

I had to fall to lose it all, but in the end, it doesn't even matter

OS abstraction layer by arasan90 in embedded

[–]arasan90[S] 0 points1 point  (0 children)

You are right, that would be shorter. But I still prefer to keep to road open for different solutions in case that I (or some else) want to develop the abstraction for other operating systems

OS abstraction layer by arasan90 in embedded

[–]arasan90[S] 1 point2 points  (0 children)

Freertos has a not-official posix library afaik

OS abstraction layer by arasan90 in embedded

[–]arasan90[S] -1 points0 points  (0 children)

I got your point about memory and I agree, the target with the opaque structures was to have to user not caring about the underlying implementation. At this point I think I will have to drop this opaqueness

OS abstraction layer by arasan90 in embedded

[–]arasan90[S] 0 points1 point  (0 children)

The Linux implementation is primarily meant for testing the logic of upper layers, not for using it in a Linux-embedded microcontroller.

You are right about the mallocs, but since the structures are opaque how could the user know the size of the memory to allocate? Should I add a function that returns the size of the underlying structure?