Skip to content

Commit

Permalink
MNTBUG: RailButtons does not have rocket_radius attribute #606.
Browse files Browse the repository at this point in the history
Running black to format files.
  • Loading branch information
juliomachad0 committed Jun 17, 2024
1 parent 6e7848c commit 0f8efb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions rocketpy/rocket/aero_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,8 +1806,13 @@ class RailButtons(AeroSurface):
relative to one of the other principal axis.
"""

def __init__(self, rocket_radius, buttons_distance,
angular_position=45, name="Rail Buttons",):
def __init__(
self,
rocket_radius,
buttons_distance,
angular_position=45,
name="Rail Buttons",
):
"""Initializes RailButtons Class.
Parameters
Expand Down
7 changes: 4 additions & 3 deletions rocketpy/rocket/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,9 +1495,10 @@ def set_rail_buttons(
RailButtons object created
"""
buttons_distance = abs(upper_button_position - lower_button_position)
rail_buttons = RailButtons(rocket_radius=self.radius,
buttons_distance=buttons_distance,
angular_position=angular_position
rail_buttons = RailButtons(
rocket_radius=self.radius,
buttons_distance=buttons_distance,
angular_position=angular_position,
)
self.rail_buttons.add(rail_buttons, lower_button_position)
return rail_buttons
Expand Down

0 comments on commit 0f8efb9

Please sign in to comment.