5 ms·
You're in trouble though when the front motors are wired one way and the rear ones another, or one particular motor is miswired. Imagine #define FRONT_MID_SECTI
by litewulf 17y ago
You're in trouble though when the front motors are wired one way and the rear ones another, or one particular motor is miswired. Imagine #define FRONT_MID_SECTION_MINI_MOTOR_POLARITY (...)
- djcapelis 17y agoTypically more like: #DEFINE MOTOR_0_WIRED_WRONG_BY_#$@#$_ELECTRICAL_TEAM #DEFINE MOTOR_1_WIRED_WRONG_BY_#$@#$_ELECTRICAL_TEAM ... That said, the notion of portable embedded code when we're talking about the types of systems where these types of hacks thrive is pretty funny. These are not the type of routines people port or reuse and most of these hacks are very specific behavioral stuff to match specific pieces of hardware. Hopefully you're not putting in hacks in the parts of the system you might actually reuse that's supposed to be more independent! Code re-use is a principle that's often struggled outside of embedded systems. Inside embedded systems code it's downright scarce.
- ramchip 17y agoI think it's getting more common in the hobby community though. Just look at all the code and modules ready to use on AVRs, Stamps, etc. It's only a shame that a lot of it is fairly unreliable C code. The situation for embedded C reminds me of PHP. You can find snippets for anything, but most of them won't be written by experienced library authors and can have an 'interesting' behaviour...
- po 17y agoIn my previous job we had several KLUDGE_TABLES as a way for our DBA to remind people that they were asking him to add a dirty hack that they promised to remove once the 'crisis' was gone. Five years later, they were still in there. At least the person querying it still had to type 'SELECT * FROM KLUDGE_…'