Skip to content

salvage: protect path lookahead std::max from Windows macros (credit @2750666716 #4788) - #9803

Open
Bartok9 wants to merge 1 commit into
microsoft:mainfrom
Bartok9:aerial/salvage-path-lookahead-stdmax-4788-20260722
Open

salvage: protect path lookahead std::max from Windows macros (credit @2750666716 #4788)#9803
Bartok9 wants to merge 1 commit into
microsoft:mainfrom
Bartok9:aerial/salvage-path-lookahead-stdmax-4788-20260722

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Motivation / differential value vs #4788

Open #4788 also proposes #include <windows.h> + Sleep(30) in the path loop. That is non-portable and changes path-following latency on every iteration. This salvage keeps only the portable macro-safe std::max form identified in that PR.

#4788 This PR
(std::max) lookahead yes yes
Sleep(30) / windows.h yes no

Recommend: merge this micro-fix; original #4788 can close or drop the Sleep path.

Verification

  • Diff review on MultirotorApiBase.cpp only
  • No behavior change on non-Windows / when macros absent
  • No arm/geofence weakening

Agent-Owner: sera · Platform: hermes · Claim-TTL: 24h

Credit @2750666716 microsoft#4788 for identifying the MSVC macro pitfall.
Land only the portable (std::max) form — omit Sleep/windows.h which
are non-portable and change path following latency.

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant