Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_RangeFinder: allow for more than 327m range #27886

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

No description provided.

@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch 3 times, most recently from 1bf6995 to 88faf49 Compare August 26, 2024 03:47
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch 2 times, most recently from ea8a289 to 1239beb Compare October 9, 2024 02:10
@peterbarker
Copy link
Contributor Author

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  8                                                                     
Durandal                            48     *           200     248               208    264    264
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     96     *           328     336               176    264    288
MatekF405                           -8     *           224     200               288    184    200
Pixhawk1-1M-bdshot                  8                  144     312               352    232    224
f103-QiotekPeriph        *                                                                     
f303-Universal           336                                                                   
iomcu                                                                *                         
revo-mini                           32     *           288     280               608    232    304
skyviper-v2450                                         48                                      

@peterbarker peterbarker added DevCallEU and removed WIP labels Oct 9, 2024
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch 11 times, most recently from 5c0e9ae to 09efa59 Compare October 11, 2024 04:38
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch from 09efa59 to 0983029 Compare December 22, 2024 21:33
ArduSub/Log.cpp Outdated Show resolved Hide resolved
ArduSub/mode_surftrak.cpp Outdated Show resolved Hide resolved
ArduSub/mode_surftrak.cpp Outdated Show resolved Hide resolved
ArduSub/sensors.cpp Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch from 0983029 to 23bf660 Compare December 23, 2024 21:47
Copy link
Contributor Author

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, @IamPete1 !

ArduSub/mode_surftrak.cpp Outdated Show resolved Hide resolved
ArduSub/mode_surftrak.cpp Outdated Show resolved Hide resolved
ArduSub/sensors.cpp Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
@peterbarker peterbarker restored the pr/rangefinder-over-327 branch January 1, 2025 10:39
@peterbarker peterbarker reopened this Jan 1, 2025
return _max_distance_cm;
// return the larger of the base class's distance and what we
// receive from the network:
return MAX(baseclass_max_distance, _max_distance);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return MAX(baseclass_max_distance, _max_distance);
return MIN(baseclass_max_distance, _max_distance);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is now the opposite to what it did before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm... again, I vaguely recall discusssing at DevCall. Made it work like it did before.

return params.max_distance_cm;
}
return _max_distance_cm;
// return the larger of the base class's distance and what we
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// return the larger of the base class's distance and what we
// return the lesser of the base class's distance and what we

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. That's odd. Fixed.

libraries/SITL/SITL.cpp Outdated Show resolved Hide resolved
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch from f657c9b to df71eb6 Compare January 1, 2025 21:14
Copy link
Contributor Author

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed things, thanks!

return params.max_distance_cm;
}
return _max_distance_cm;
// return the larger of the base class's distance and what we
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. That's odd. Fixed.

libraries/SITL/SITL.cpp Outdated Show resolved Hide resolved
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch 2 times, most recently from 1d91828 to de16535 Compare January 3, 2025 02:30
@peterbarker peterbarker requested a review from IamPete1 January 3, 2025 02:31

// return the smaller of the base class's distance and what we
// receive from the network:
return MIN(baseclass_min_distance, _min_distance);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected this one to be MAX

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I think I recall us discussing this change at DevCall, but I can't find nnotes on it, so I've made it work like the old code.

@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch from de16535 to 7b8cbb4 Compare January 16, 2025 00:21
@peterbarker peterbarker force-pushed the pr/rangefinder-over-327 branch from 7b8cbb4 to 246b082 Compare January 16, 2025 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants