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

Release/v0.3.1 #16

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions config/hardware_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"RADIO_PORT": "/dev/ttyUSB0",
"RADIO_BAUDRATE": 57600,
"RADIO_HOST": "localhost",
"RADIO_TCP_PORT": 50000,
"RADIO_SERVER_MODE": true
"RADIO_TCP_PORT": 50000
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "radio-telemetry-tracker-drone-fds"
version = "0.3.0"
version = "0.3.1"
description = "Radio Telemetry Tracker Drone FDS"
authors = ["Tyler Flar <[email protected]>"]
packages = [
Expand Down
2 changes: 1 addition & 1 deletion radio_telemetry_tracker_drone_fds/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Radio Telemetry Tracker Drone FDS."""

__version__ = "0.3.0"
__version__ = "0.3.1"
6 changes: 1 addition & 5 deletions radio_telemetry_tracker_drone_fds/config/hardware_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _configure_radio_settings(cls, config: HardwareConfig, data: dict[str, Any])
elif config.RADIO_INTERFACE.lower() == "simulated":
config.RADIO_HOST = data["RADIO_HOST"]
config.RADIO_TCP_PORT = int(data["RADIO_TCP_PORT"])
config.RADIO_SERVER_MODE = data.get("RADIO_SERVER_MODE", False)
config.RADIO_SERVER_MODE = True

@classmethod
def _create_gps_config(cls, data: dict[str, Any]) -> HardwareConfig:
Expand Down Expand Up @@ -238,7 +238,3 @@ def _validate_radio_config(cls, data: dict[str, Any], operation_mode: str) -> No
except ValueError as e:
msg = "RADIO_TCP_PORT must be an integer"
raise ConfigError(msg) from e

if "RADIO_SERVER_MODE" in data and not isinstance(data["RADIO_SERVER_MODE"], bool):
msg = "RADIO_SERVER_MODE must be a boolean"
raise ConfigError(msg)
10 changes: 8 additions & 2 deletions tests/test_online_ping_finder_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,14 @@ def test_sync_request_handler(online_manager: OnlinePingFinderManager, mock_dron
# Set GPS state to Running
online_manager._state_manager.set_gps_state(GPSState.RUNNING) # noqa: SLF001

# Handle sync request
online_manager._handle_sync_request(SyncRequestData()) # noqa: SLF001
# Handle sync request with required arguments
sync_request = SyncRequestData(
packet_id=1,
timestamp=0,
ack_timeout=2.0,
max_retries=5,
)
online_manager._handle_sync_request(sync_request) # noqa: SLF001
mock_drone_comms.send_sync_response.assert_called_with(SyncResponseData(success=True))

# Simulate acknowledgment callback
Expand Down
Loading