Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
267ccfc
core: service: cable_guy: Add [temporary] Pydantic IP shin
joaoantoniocardoso Apr 23, 2025
b336ad9
core: service: cable_guy: Introduce Route model
joaoantoniocardoso Apr 23, 2025
37b70db
core: service: cable_guy: Add default multicast route to config
joaoantoniocardoso Apr 23, 2025
7e7e93b
core: service: cable_guy: Create SettingsV2 to acomodate Routes
joaoantoniocardoso Apr 23, 2025
382748b
core: service: cable_guy: api: Keep V1 settings separated from V2
joaoantoniocardoso Apr 29, 2025
0e86393
core: service: cable_guy: Make Manager use SettingsV2
joaoantoniocardoso Apr 23, 2025
6a55864
core: service: cable_guy: Add missing routes on NetworkInterface inst…
joaoantoniocardoso Apr 23, 2025
185282e
core: service: cable_guy: Add route interface methods to Manager
joaoantoniocardoso Apr 23, 2025
1a250fc
core: service: cable_guy: Handle routes configuration
joaoantoniocardoso Apr 23, 2025
259c1f5
core: service: cable_guy: Add REST API route endpoints
joaoantoniocardoso Apr 23, 2025
89d21a5
core: services: cable_guy: api: Improve error message
joaoantoniocardoso May 15, 2025
1a82965
core: services: cable_guy: api: Ignore route if already exists
joaoantoniocardoso May 15, 2025
42aa239
core: tools: mavlink-camera-manager: Update to t3.19.3
joaoantoniocardoso Jun 5, 2025
84696e4
core: tools: mavlink-camera-manager: Update to t3.19.4
joaoantoniocardoso Jun 6, 2025
26cc0f2
frontend: add missing route for extensionv2
Williangalvani Aug 5, 2025
1ca517a
nginx: fix 404
Williangalvani Jul 30, 2025
9c5dc76
autopilot manager: fix auto_restart_autopilot() race condition
Williangalvani Jun 30, 2025
4d06c8f
Frontend: PwmSetup: fix highlight logic to handle re-mapping of thrus…
Williangalvani Jul 29, 2025
2442f2c
Frontend: PwmSetup: fix motor test so it displays remapped ouputs on …
Williangalvani Jul 29, 2025
c66014f
Frontend: InlineParameterEditor: make parameters value update when dr…
Williangalvani Jul 28, 2025
21736a6
ardupilot_manager: create shortcut for script directory when using linux
nicoschmdt Jul 24, 2025
02a00ef
Frontend: ServoFunctionEditorDialog.vue: make sliders text not-select…
Williangalvani Jul 28, 2025
79c75f6
core: tools: mavlink_server: bootstrap: Update to 0.5.9
patrickelectric Jul 3, 2025
eea5b37
core: frontend: VideoStreamCreationDialog: use even default UDP ports
ES-Alexander Jun 12, 2025
49986a0
core: services: ardupilot_manager: mavlink_proxy: Save mavlink-server…
joaoantoniocardoso May 30, 2025
517ed7f
core: services: ardupilot_manager: mavlink_proxy: Define missing self…
joaoantoniocardoso Jun 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default Vue.extend({
watch: {
param(newParam) {
this.internal_new_value = newParam?.value ?? 0
this.internal_new_value_as_string = this.internal_new_value.toString()
this.internal_new_value_as_string = String(this.internal_new_value)
},
is_form_valid(valid) {
this.$emit('form-valid-change', valid)
Expand All @@ -200,6 +200,7 @@ export default Vue.extend({
this.updateSelectedFlags()
if (this.last_sent_value === undefined) {
this.internal_new_value = this.param_value
this.internal_new_value_as_string = String(this.internal_new_value)
}
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ export default Vue.extend({
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
user-select: none;
text-align: center;
}
</style>
30 changes: 21 additions & 9 deletions core/frontend/src/components/vehiclesetup/PwmSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@
width="100%"
height="65"
class="ma-0 pa-0"
@mouseover="highlight = [
stringToUserFriendlyText(printParam(getParam(`SERVO${motor.servo}_FUNCTION`))),
]"
@mouseover="highlightMotor(motor)"
@mouseleave="highlight = default_highlight"
>
<td width="20%">
{{ motor.name }}
<span v-if="motor.servo !== motor.motor">
(Output {{ motor.servo }})
</span>
</td>
<td width="10%">
<parameterSwitch
Expand Down Expand Up @@ -177,6 +178,7 @@ import ParameterSwitch from '../common/ParameterSwitch.vue'

interface MotorTestTarget {
name: string
motor: number
servo: number // target and servo differ in rover
target: number
direction: number
Expand Down Expand Up @@ -246,18 +248,20 @@ export default Vue.extend({
return this.servo_function_parameters.filter(
(parameter) => parameter.value >= SERVO_FUNCTION.MOTOR1 && parameter.value <= SERVO_FUNCTION.MOTOR8,
).map((parameter) => {
const number = parseInt(/\d+/g.exec(parameter.name)?.[0] ?? '0', 10)
const name = param_value_map.Submarine[parameter.name] ?? `Motor ${number}`
const direction_parameter = autopilot_data.parameterRegex(`MOT_${number}_DIRECTION`)?.[0]
const target = number - 1
const servo_number = parseInt(/\d+/g.exec(parameter.name)?.[0] ?? '0', 10)
const motor_number = parseInt(/\d+/g.exec(printParam(parameter))?.[0] ?? '0', 10)
const name = param_value_map.Submarine[parameter.name] ?? `Motor ${motor_number}`
const direction_parameter = autopilot_data.parameterRegex(`MOT_${motor_number}_DIRECTION`)?.[0]
const target = motor_number - 1
return {
name,
servo: number,
servo: servo_number,
motor: motor_number,
target,
direction: direction_parameter.value,
reverse_parameter: direction_parameter,
}
})
}).sort((a, b) => a.motor - b.motor)
},
available_motors(): MotorTestTarget[] {
if (this.is_rover) {
Expand Down Expand Up @@ -290,6 +294,7 @@ export default Vue.extend({
return {
name,
servo,
motor: servo,
target,
direction: reverse_parameter.value ? -1.0 : 1.0,
reverse_parameter,
Expand Down Expand Up @@ -399,6 +404,13 @@ export default Vue.extend({
this.uninstallListeners()
},
methods: {
highlightMotor(motor: MotorTestTarget) {
if (this.is_rover) {
this.highlight = [this.stringToUserFriendlyText(printParam(this.getParam(`SERVO${motor.servo}_FUNCTION`)))]
} else {
this.highlight = [`Motor${motor.motor}`]
}
},
convert_servo_name(name: string) {
return name.replace('SERVO', 'Output ').replace('_FUNCTION', '')
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,13 @@ export default Vue.extend({
case StreamType.UDP:
if (!this.stream_endpoints[index].includes('udp://')) {
// Vue.set() forces the update of a nested property
Vue.set(this.stream_endpoints, index, `udp://${this.user_ip_address}:${5600 + index}`)
Vue.set(this.stream_endpoints, index, `udp://${this.user_ip_address}:${5600 + 2 * index}`)
}
break
case StreamType.UDP265:
if (!this.stream_endpoints[index].includes('udp265://')) {
// Vue.set() forces the update of a nested property
Vue.set(this.stream_endpoints, index, `udp265://${this.user_ip_address}:${5600 + index}`)
Vue.set(this.stream_endpoints, index, `udp265://${this.user_ip_address}:${5600 + 2 * index}`)
}
break
case StreamType.RTSP:
Expand Down
5 changes: 5 additions & 0 deletions core/frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ const routes: Array<RouteConfig> = [
name: 'Named Extensions',
component: ExtensionView,
},
{
path: '/extensionv2/:name',
name: 'Named Extensions (v2)',
component: ExtensionView,
},
{
path: '/tools/extensions-manager',
name: 'Extension Manager',
Expand Down
10 changes: 7 additions & 3 deletions core/frontend/src/views/ExtensionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ export default Vue.extend({
if (helper.services.length === 0) {
return undefined
}
return helper.services.filter(
(service) => service?.metadata?.sanitized_name === this.$route.params.name,
)[0]?.port ?? null
return this.service?.port ?? null
},
supports_v2(): boolean {
return this.service?.metadata?.works_in_relative_paths ?? false
},
service_path(): string {
if (this.supports_v2) {
return `/extensionv2/${this.$route.params.name}`
}
return `${window.location.protocol}//${window.location.hostname}:${this.detected_port}`
+ `/${this.remaining_path ?? ''}`
+ `?time=${this.cache_busting_time}`
Expand Down
9 changes: 7 additions & 2 deletions core/services/ardupilot_manager/autopilot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,12 @@ def is_ardupilot_process(process: psutil.Process) -> bool:
"""Checks if given process is using a Ardupilot's firmware file, for any known platform."""
for platform in Platform:
firmware_path = self.firmware_manager.firmware_path(platform)
if str(firmware_path) in " ".join(process.cmdline()):
return True
try:
if str(firmware_path) in " ".join(process.cmdline()):
return True
except psutil.NoSuchProcess:
# process may have died before we could call cmdline()
pass
return False

return list(filter(is_ardupilot_process, psutil.process_iter()))
Expand Down Expand Up @@ -579,6 +583,7 @@ async def start_ardupilot(self) -> None:

if flight_controller.platform.type == PlatformType.Linux:
assert isinstance(flight_controller, LinuxFlightController)
flight_controller.setup()
await self.start_linux_board(flight_controller)
elif flight_controller.platform.type == PlatformType.Serial:
await self.start_serial(flight_controller)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from typing import List, Type

from smbus2 import SMBus
Expand All @@ -8,6 +9,9 @@
class LinuxFlightController(FlightController):
"""Linux-based Flight-controller board."""

STANDARD_SCRIPT_DIRECTORY_PATH = "/root/.config/ardupilot-manager/firmware/scripts"
LUA_SCRIPT_DIRECTORY_PATH = "/shortcuts/lua_scripts"

@property
def type(self) -> PlatformType:
return PlatformType.Linux
Expand All @@ -26,6 +30,13 @@ def check_for_i2c_device(self, bus_number: int, address: int) -> bool:
except OSError:
return False

def setup(self) -> None:
os.makedirs(self.STANDARD_SCRIPT_DIRECTORY_PATH, exist_ok=True)
try:
os.symlink(self.STANDARD_SCRIPT_DIRECTORY_PATH, self.LUA_SCRIPT_DIRECTORY_PATH)
except FileExistsError:
pass

@classmethod
def get_all_boards(cls) -> List[Type["LinuxFlightController"]]:
all_subclasses = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class MAVLinkServer(AbstractRouter):
def __init__(self) -> None:
super().__init__()
self.log_path: Optional[str] = None

def _get_version(self) -> Optional[str]:
binary = self.binary()
Expand Down Expand Up @@ -40,7 +41,10 @@ def convert_endpoint(endpoint: Endpoint) -> str:
filtered_endpoints = Endpoint.filter_enabled(self.endpoints())
endpoints = " ".join([convert_endpoint(endpoint) for endpoint in [master_endpoint, *filtered_endpoints]])

return f"{self.binary()} {endpoints}"
if not self.log_path:
self.log_path = "/var/logs/blueos/services/mavlink-server/"

return f"{self.binary()} {endpoints} --log-path={self.log_path}"

@staticmethod
def name() -> str:
Expand Down
Loading
Loading