mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
SITL: added support for "quad-fast" frame
much more powerful copter for testing nav at high speed
This commit is contained in:
parent
00c2b4b30f
commit
9e01d7de6c
@ -115,7 +115,8 @@ static const Motor firefly_motors[] =
|
||||
};
|
||||
|
||||
/*
|
||||
table of supported frame types
|
||||
table of supported frame types. String order is important for
|
||||
partial name matching
|
||||
*/
|
||||
static Frame supported_frames[] =
|
||||
{
|
||||
@ -123,10 +124,10 @@ static Frame supported_frames[] =
|
||||
Frame("quad", 4, quad_plus_motors),
|
||||
Frame("copter", 4, quad_plus_motors),
|
||||
Frame("x", 4, quad_x_motors),
|
||||
Frame("hexa", 6, hexa_motors),
|
||||
Frame("hexax", 6, hexax_motors),
|
||||
Frame("octa", 8, octa_motors),
|
||||
Frame("hexa", 6, hexa_motors),
|
||||
Frame("octa-quad", 8, octa_quad_motors),
|
||||
Frame("octa", 8, octa_motors),
|
||||
Frame("tri", 3, tri_motors),
|
||||
Frame("y6", 6, y6_motors),
|
||||
Frame("firefly", 6, firefly_motors)
|
||||
@ -152,7 +153,8 @@ void Frame::init(float _mass, float hover_throttle, float _terminal_velocity, fl
|
||||
Frame *Frame::find_frame(const char *name)
|
||||
{
|
||||
for (uint8_t i=0; i < ARRAY_SIZE(supported_frames); i++) {
|
||||
if (strcasecmp(name, supported_frames[i].name) == 0) {
|
||||
// do partial name matching to allow for frame variants
|
||||
if (strncasecmp(name, supported_frames[i].name, strlen(supported_frames[i].name)) == 0) {
|
||||
return &supported_frames[i];
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,11 @@ MultiCopter::MultiCopter(const char *home_str, const char *frame_str) :
|
||||
printf("Frame '%s' not found", frame_str);
|
||||
exit(1);
|
||||
}
|
||||
frame->init(1.5, 0.51, 15, 4*radians(360));
|
||||
if (strstr(frame_str, "-fast")) {
|
||||
frame->init(1.5, 0.5, 85, 4*radians(360));
|
||||
} else {
|
||||
frame->init(1.5, 0.51, 15, 4*radians(360));
|
||||
}
|
||||
frame_height = 0.1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user