LegacyNsfw / PcmHacks

PCM Hammer & PCM Logger, tools for General Motors Powertrain Control Modules (PCMs).
http://pcmhammer.org
171 stars 64 forks source link

revert using directive to control mock device and port #330

Closed patrickmcquay closed 1 year ago

patrickmcquay commented 1 year ago

per: https://github.com/LegacyNsfw/PcmHacks/commit/5f47e146b203636722dd52f7efe7fce7dc22b8ae#r124815628

I've just reverted this, there isnt really a better way to do this than was there if DEBUG is not usable.

additional #defines (MOCKPORT) would have to be removed before submission anyway, changing the project file to add different symbols or build configs is similar in that they would likely have to be removed before submission as well.

patrickmcquay commented 1 year ago

also the mock code is of limited usability anyway. I'll probably grab a spare PCM to have a bench setup and a backup sooner or later.

Gampyg28 commented 1 year ago

Why would #if MOCKPORT ... #endif need to be removed before submission ?

patrickmcquay commented 1 year ago

It wouldnt, but the coresponding define would need to be, either that or the change to the project file to define it globally. Unless I'm missing something? Ive really not done a whole lot of work with preprocessor stuff, and couldnt think of anything else that would be as "automatic" as using the debug symbol.