Add guards around platform-specific code#2189
Conversation
board/flasher.h
Outdated
| @@ -1,3 +1,4 @@ | |||
| #ifdef BOOTSTUB | |||
There was a problem hiding this comment.
is this one needed? think it's only included in bootstub.c anyways?
|
trigger-jenkins |
|
@trigger-jenkins ? |
that makes our internal HITL tests run on external branches |
|
Oh neat! Is there a way for me to see the outcome of the hitl test? I see https://github.com/commaai/panda/actions/runs/14512340605/job/40713706664, but that doesn't seem to be the test itself. I don't see anything relevant in the openpilot repo gh actions tab either. |
Not really, Jenkins is hosted on our internal network |
* guard platform specific code * more simple * less dumb guard * stragglers * blankspace * blankspace2 * crc.h * keep condition * good call * consistency * another one --------- Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
* guard platform specific code * more simple * less dumb guard * stragglers * blankspace * blankspace2 * crc.h * keep condition * good call * consistency * another one --------- Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
* Fix query_fw_versions.py (commaai#2140) remove debug param * new opendbc debug api (commaai#2141) * Remove car specific flags (commaai#2116) * Subaru: combine panda flags * Remove car-specific panda flags * Rename usages in tests * update opendbc ref * ? ? * fix ltl * order --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> * Rename to SafetyFlags (commaai#2144) * safety flags * update ref * fix ltl * Move safety constants to opendbc (commaai#2145) * move to opendbc * all passing * do the rest * fix * and another * order * and update ref to master * Missing Safety references (commaai#2146) * forgot these * fix that * Fix opendbc hitl test (commaai#2147) needs opendbc * split libpanda library (commaai#2149) * duplicate libpanda * rename rename * update libpanda to remove safety helpers * libpanda -> libsafety * remove some stuff in libsafety * rm some stuff from safety.c * libc * fix * dont include safety helpers * Remove hw type from safety tests (commaai#2151) * Tesla: update ignition signal for Model 3/Y (commaai#2153) update ignition signal * Safety for Tesla Model 3 / Model Y (commaai#2036) * wip model3 * master * tesla model 3 / y * prevent tesla to reverse * remove can 1 from safety * use DI_vehicleSpeed * - add APS_eacMonitor to TX - use DI_state as a standstill signal * block eacMonitor * fix tesla safety tests * fix tesla safety tests * add generic_rx_check for eacMonitor * fix tests * consistent ordering of common user brake test setup * Tesla: Panda safety update (commaai#2075) * - match "vehicle_moving" with opendbc - allow to cancel * remove comment * update _vehicle_moving_msg * remove redundant condition * whoops * update ref * spacing! * long behind ALLOW_DEBUG * consistent styling * ? * misra and clean up * divide instead * double (()) * more stylistic * this is more clear * always check aeb * this test catches it * it should test angle steering in both modes? * we weren't testing long at all, and ALSO PYTEST SILENTLY SKIPS CLASSES WITH MISSING ABSTRACT METHODS WTF * finalize safety tests * update opendbc to master * ltl * revert this * rm conftest * loop this --------- Co-authored-by: Greg Hogan <gregjhogan@gmail.com> Co-authored-by: Shane Smiskol <shane@smiskol.com> * Move car safety modes to opendbc (commaai#2143) * move safety tests * move libsafety * move safety * remove safety test job * fix compilation * update ref * rm safety mutation test * fix misra test * no safety here * fix build for both local and docker * already tested * fix misra mutation * move Safety Model readme section to opendbc * and panda * fix * in * not here * not here * bump opendbc ref to master * Change safety model imports (commaai#2158) * fix test_pandad * fix all the imports * Rivian: add CAN ignition (commaai#2157) Rivian CAN ignition * safety_replay: opendbc libsafety + msg sorting (commaai#2162) * Fix safety_replay * Sort * Safety replay: support Rivian * Fix Rivian ignition (commaai#2163) * fix rivian ignition * rm * fix * wtf copilot * Rivian: fix ignition signal overlap (commaai#2165) Fix Rivian ignition overlap * Move isotp.py, ccp.py and xcp.py to opendbc (commaai#2166) * Move ccp.py and xcp.py to opendbc * move isotp * more cleanup * safety replay: use lr.first() * Move safety replay to opendbc (commaai#2167) move to opendbc * add set_alternative_experience method to Panda class (commaai#2168) * pre-commit: autoupdate hooks (commaai#2071) Update pre-commit hook versions Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com> * Lower fan setting on boot (commaai#2119) * Lower fan setting on boot * fix build * Update udev rules in README (commaai#2159) * ignition: add Rivian comment * Rivian: properly parse ignition signal 3 isn't defined, but you never know (2 is shutting down) * More sound fixes (commaai#2169) * always pick the next playback buf and wait until we've finished playing this one * misra fix --------- Co-authored-by: Comma Device <device@comma.ai> * Refactor and cleanup board init (part 1) (commaai#2094) * refactor out red chiplet * global can mode set * global led disable * this is already done globally * global harness init * global spi gpio init * init OBD_SBUx_RELAY pins in harness init * this is already done in harness init * global set_can_mode * fix SWD on F4 * no more has_obd * global enable_transceivers * Revert "global set_can_mode" This reverts commit 09e19c3. --------- Co-authored-by: Comma Device <device@comma.ai> * Init cleanup: global LED driver (commaai#2170) * wip * fix init * fix libpanda * cleanup --------- Co-authored-by: Comma Device <device@comma.ai> * disable that for now * Fan controller fixes (commaai#2177) Fix overflow and clamp integral * Fan controller: fix instability on high rpm fans (commaai#2179) * integrator error relative to max rpm * need to cast * Log divergent registers once (commaai#2182) log divergent reg * 1min is a bit tight * Cleanup common and useless debug logs (commaai#2183) * cleanup common logs * cleanup puth2 * Cuatro: changes for new board rev (commaai#2176) changes for new board rev Co-authored-by: Comma Device <device@comma.ai> * CAN ignition: fix unscoped prev counter (commaai#2191) scoped prev_counter * Delete unused watchdog, lldac, uart_rx_ring (commaai#2188) * delete unused code! * watchdog init delete * delete watchdog.h * Add guards around platform-specific code (commaai#2189) * guard platform specific code * more simple * less dumb guard * stragglers * blankspace * blankspace2 * crc.h * keep condition * good call * consistency * another one --------- Co-authored-by: Robbe Derks <robbe.derks@gmail.com> * ignition: suffix counters (commaai#2194) suffix counters * Fix register errors (commaai#2197) * fix some errors * forgot this * turns out this didn't work and makes it too quiet when it does * this also dynamically changes * this is the interrupt timer itself * fix(macos): macOS 15 and greater (commaai#2196) * fix macos * Revert "fix macos" This reverts commit f52d30c. * use gcc on < macOS 15 * link to issue * Fix safety flag rename (commaai#2198) fix * setup opendbc dependency properly (commaai#2202) * rm that * bump * lil more * update * fix libpanda * update * fix misra * python3? * update ref * fix mutation * setup script (commaai#2201) * setup script * update readme * pre-commit: autoupdate hooks (commaai#2178) Update pre-commit hook versions Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com> * rm linux driver * remove socketcan ci job * Update GitHub Actions actions versions (commaai#2204) * chore: update GitHub action versions * pin that * Apply suggestions from code review * reorg (commaai#2206) * reorg * one less config file * lil more * lil more * Move setup to pyproject (commaai#2207) * migrate packaging to pyproject * fix * mv * lil more * remove dead mull stuff (commaai#2208) * remove dead mull stuff * rm clang * fix * speeeedy ci (commaai#2209) * speeeedy ci * disable for now * rm * cppcheck cache * simple docker * one more * needs to get to 1m... * one more * needs time to build * libusb * test.sh: the master test script (commaai#2210) * init test.sh * good riddance * docs * curl * source * or * skip that one * passes * clean up * no pythonpath * rm that * CI: speed up MISRA mutation job (commaai#2213) * CI: speed up MISRA mutation job * install first * no more socketcan * initialize DAC with silent value (commaai#2215) silence * setup.sh: no homebrew autoupdate * add macOS to CI (commaai#2217) * add macOS to CI * cleanup * debug * cmt * can't wait for ty * enable amp on that pin too (commaai#2219) Co-authored-by: Comma Device <device@comma.ai> * sound-new-rev * Revert "sound-new-rev" This reverts commit 6c98179. * cuatro: test in CI (commaai#2218) hitl * PWM-ing LED (commaai#2221) * PWMing LED * consistency * fix in bootstub --------- Co-authored-by: Comma Device <device@comma.ai> * no more pylint * endpoint to set TIM1 period and channel pulse length (commaai#2222) works * Deprecate uno + grey (commaai#2223) * Deprecate uno + grey * lil more * Add support for generating clang compilation database by default (commaai#2225) compilation db by default * Deprecate white and black pandas (commaai#2227) * deprecate white and black pandas * static * Deprecate jungle v1 (commaai#2228) jungle: deprecate v1 board * gitignore compile_commands.json * make jenkins green again (commaai#2230) * just make it green * fix resetter * fix perms * better caching * just copy * simplify more * fix that up * nope * simplify HITL tests (commaai#2229) * lil fixups * revert that for now * no n0 * also 1.8V * global * quick garbage collection pass (commaai#2231) * remove DPANDA * -22 * lil more * canfd * lil more * update cppcheck * uart cleanup * always harness * sbu sense * lil more * enable spi * rm ENABLE_SPI * Include from project root (commaai#2232) * fix include paths * cleanup * cleanup build (commaai#2234) * cleanup bootstub build * cleanup rest of build * less files * all in same obj * oops * lil more * move bootstub define * fix pwm.h indentation * fix external build * always use opendbc master (commaai#2244) * remove some old comments * opendbc updates (commaai#2245) * opendbc updates * get latest opendbc in docker * . * Differential sound (commaai#2220) * drive negative pin with constant value * flag * Revert "flag" This reverts commit e32fee7. * handle both * good ol' misra * complete * complete * default --------- Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Generic ADC implementation (commaai#2246) * refactor panda side * fix misra? * use common ADC driver in jungle * fix misra fr now * fix oversampling * default channel macro * one more * this makes more sense --------- Co-authored-by: Comma Device <device@comma.ai> * SPI: spi_error_count is a better name (commaai#2248) SPI: rename spi_checksum_error_count -> spi_error_count * a few more spi error counts * SPI: add NACK test endpoint (commaai#2249) Co-authored-by: Comma Device <device@comma.ai> * ci: swap bootkick device (commaai#2250) fix? * ADC VDDA calibration (commaai#2247) * working adc calibration * bit of cleanup * cleanup more * fix misra --------- Co-authored-by: Comma Device <device@comma.ai> * Keep supporting White/Black pandas from Python side (commaai#2252) Support White/Black pandas from Python * CI: auto-update cppcheck weekly (commaai#2253) * CI: auto-update cppcheck weekly * no push * Panda.list() optimization for comma three (commaai#2255) Co-authored-by: Comma Device <device@comma.ai> --------- Co-authored-by: Lukas <61192133+lukasloetkolben@users.noreply.github.com> Co-authored-by: Shane Smiskol <shane@smiskol.com> Co-authored-by: Eric Brown <eric@ebrown.net> Co-authored-by: Greg Hogan <gregjhogan@gmail.com> Co-authored-by: Kacper Rączy <gfw.kra@gmail.com> Co-authored-by: Willem Melching <willem.melching@gmail.com> Co-authored-by: Dean Lee <deanlee3@gmail.com> Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com> Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Robbe Derks <robbe.derks@gmail.com> Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: aubsw <10409668+aubsw@users.noreply.github.com> Co-authored-by: Trey Moen <50057480+greatgitsby@users.noreply.github.com> Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com> Co-authored-by: DevTekVE <devtekve@gmail.com>
For #2171.
Add guards around platform/target-specific code. This way we won't have add cpp rule supression later.