Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Stinky_Pete
Aug 16, 2015

Stinkier than your average bear
Lipstick Apathy
I'm porting some legacy code that will eventually be in airplane cockpits. It's probably the spaghettiest code I've ever encountered, and in its previous environment it was the only thing running on the processor, so there's a ton of cryptically-named files to remove (and #includes and function calls), including a lot of talking to flash memory and an fpga, and now there are a ton of configuration defaults that would be changed in a menu that I also had to remove, to track down and get airspace maps to appear. But at least I finally got it to display something... it actually looked better than this before I kept fixing it to show the map. I swear I have something that clears the screen buffer every frame.

Adbot
ADBOT LOVES YOU

Stinky_Pete
Aug 16, 2015

Stinkier than your average bear
Lipstick Apathy

Storgar posted:

That's something I've always been curious about. What kind of validation standards do people have for airplanes? Do you need to do any rigorous regression or are we all flying around with software written by someone on a 72 hour soda binge?

According to my superiors, a lot of our existing products were just badly written by people who are no longer here. I don't know any more than that. To be fair, it was like one of the first of these indicators that even had an LCD screen.

Nonetheless, we do have very rigorous testing that's mandated by the FAA, and we have to trace every test on every unit of code (I think the function level) to a requirement that we've defined and linked to more general FAA guidelines, along with industry standards. So we have dedicated test engineers and a few people whose whole job is to know all about the relevant FAA documents and keep track of how we're fulfilling them. We also flight test in our own airplane as part of the certification process, and every engineer involved has to be on the plane. It turns out that's a pretty good motivator to not cut corners.

We're also not allowed to use, for instance, dynamic memory allocation. Everything has to be completely deterministic.

Anyway, I made a ton of progress yesterday, but lost some time with this little lesson in the order of operations:
code:
lcd_bufbase = (uchar*) &lcd_bufptr[0];


E: I finally fixed it for good. It is a humbling fact that everything wrong with it was just me doing unit conversion wrong (from engineering units to scaled integers, and between struct and byte sizes of buffers), which was hard for me to see because of a maze of #defines

Stinky_Pete fucked around with this message at 22:20 on Aug 28, 2015

Stinky_Pete
Aug 16, 2015

Stinkier than your average bear
Lipstick Apathy

TooMuchAbstraction posted:

Do you have simulated cockpits to do basic testing on?

No shake machines, if that's what you're asking, but we're using Xplane and I believe its SDK to substitute in our own autopilot/flight director (which I finished implementing from a savant-like mech eng's design, we're talking hundred of diagrams, a few months ago) to test it. We also have a portable setup with a throttle stick and all the buttons for pilot controls. The CEO's son has a pilot's license and has been working on that end.

  • Locked thread