Skip to content

Clean up implementation of enable/disable of tx over regions#481

Open
MedadRufus wants to merge 36 commits intoicspace-devfrom
transmit-all-over-europe
Open

Clean up implementation of enable/disable of tx over regions#481
MedadRufus wants to merge 36 commits intoicspace-devfrom
transmit-all-over-europe

Conversation

@MedadRufus
Copy link
Member

@MedadRufus MedadRufus commented Jan 17, 2023

Use much easier to maintain C99 style array indexes to keep track of polygons and where they can transmit from.

@MedadRufus
Copy link
Member Author

MedadRufus commented Jan 17, 2023

TODO:

  • Add a unittest that ensures all polygons have a true/false value for TX allowed. Even if number of polygons increase or decrease.

@@ -1038,10 +999,7 @@ Polygon_t get_polygon(float latitude, float longitude)
tx_permission_t get_permissions(Polygon_t currentpoly)
{
// then lookup value. Danger, there is no bounds validation for current poly. Can cause corruption.
Copy link
Member Author

Choose a reason for hiding this comment

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

do add the bounds check

void read_geofence_settings_in_eeprom(bool *values)
void read_geofence_settings_in_eeprom(tx_permission_t *values)
{
// todo: check non-null
Copy link
Member Author

Choose a reason for hiding this comment

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

check non null

@MedadRufus MedadRufus changed the title Transmit all over Europe Clean up implementation of enable/disable of tx over regions Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant