Skip to content
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
2 changes: 1 addition & 1 deletion Apps/SatelliteTracker/main/Source/DeviceLocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ void DeviceLocation::update(TaskEventGroup* eventGroup, bool wanted) {
bool shouldRun = wanted && location_is_enabled();
if (shouldRun && !subscribed) {
subscription = LocationSubscription {};
subscribed = location_subscribe(&subscription, eventGroup) == ERROR_NONE;
subscribed = location_subscribe(&subscription, eventGroup, "Satellite Tracker") == ERROR_NONE;
} else if (!shouldRun && subscribed) {
stop();
}
Expand Down
5 changes: 4 additions & 1 deletion Apps/SatelliteTracker/main/Source/LocationApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,21 @@ struct Location {
char provider[LOCATION_PROVIDER_ID_MAX_LENGTH + 1];
};

#define LOCATION_SUBSCRIBER_DESCRIPTION_MAX_LENGTH 24

struct LocationSubscription {
uint32_t bit;

struct {
char description[LOCATION_SUBSCRIBER_DESCRIPTION_MAX_LENGTH + 1];
struct TaskEventGroup* event_group;
struct LocationSubscription* next;
} internal;
};

bool location_is_enabled(void);
error_t location_get(struct Location* location);
error_t location_subscribe(struct LocationSubscription* sub, struct TaskEventGroup* event_group);
error_t location_subscribe(struct LocationSubscription* sub, struct TaskEventGroup* event_group, const char* description);
error_t location_unsubscribe(struct LocationSubscription* sub);

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions Apps/SatelliteTracker/manifest.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ manifest.version=0.3
target.sdk=0.8.0-dev
target.platforms=all
id=tactility.satellitetracker
version.name=0.4.0
version.code=4
version.name=0.4.1
version.code=5
name=Satellite Tracker
description=World map with live satellite positions and passes
app.0.id=tactility.satellitetracker
Expand Down
Loading