Skip to content
Open
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
4 changes: 2 additions & 2 deletions notecard/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def log(card, alert=None, sync=None, text=None):

@validate_card_object
def set(card, align=None, details=None, duration=None, host=None, inbound=None, mode=None, off=None, on=None, outbound=None, product=None, seconds=None, sn=None, sync=None, umin=None, uoff=None, uperiodic=None, version=None, vinbound=None, voutbound=None):
r"""Use hub.set request is the primary method for controlling the Notecard's Notehub connection and sync behavior.
"""Use hub.set request is the primary method for controlling the Notecard's Notehub connection and sync behavior.

Args:
card (Notecard): The current Notecard object.
Expand All @@ -62,7 +62,7 @@ def set(card, align=None, details=None, duration=None, host=None, inbound=None,
inbound (int): The max wait time, in minutes, to sync inbound data from Notehub. Explicit syncs (e.g. using `hub.sync`) do not affect this cadence. When in `periodic` or `continuous` mode this argument is required, otherwise the Notecard will function as if it is in `minimum` mode as it pertains to syncing behavior. Use `-1` to reset the value back to its default of `0`. A value of `0` means that the Notecard will never sync inbound data unless explicitly told to do so (e.g. using `hub.sync`).
mode (str): The Notecard's synchronization mode. NOTE: The Notecard must be in `periodic` or `continuous` mode to use the onboard GPS module.
off (bool): Set to `true` to manually instruct the Notecard to resume periodic mode after a web transaction has completed.
on (bool): If in `periodic` mode, used to temporarily switch the Notecard to `continuous` mode to perform a web transaction.\n\nIgnored if the Notecard is already in `continuous` mode or if the Notecard is NOT performing a web transaction.
on (bool): If in `periodic` mode, used to temporarily switch the Notecard to `continuous` mode to perform a web transaction. Ignored if the Notecard is already in `continuous` mode or if the Notecard is NOT performing a web transaction.
outbound (int): The max wait time, in minutes, to sync outbound data from the Notecard. Explicit syncs (e.g. using `hub.sync`) do not affect this cadence. When in `periodic` or `continuous` mode this argument is required, otherwise the Notecard will function as if it is in `minimum` mode as it pertains to syncing behavior. Use `-1` to reset the value back to its default of `0`. A value of `0` means that the Notecard will never sync outbound data unless explicitly told to do so (e.g. using `hub.sync`).
product (str): A Notehub-managed unique identifier that is used to match Devices with Projects. This string is used during a device's auto-provisioning to find the Notehub Project that, once provisioned, will securely manage the device and its data.
seconds (int): If in `periodic` mode and using `on` above, the number of seconds to run in continuous mode before switching back to periodic mode. If not set, a default of 300 seconds is used. Ignored if the Notecard is already in continuous mode.
Expand Down
6 changes: 3 additions & 3 deletions notecard/ntn.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

@validate_card_object
def gps(card, off=None, on=None):
"""Determine whether a Notecard should override a paired Starnote's GPS/GNSS location with its own GPS/GNSS location. The paired Starnote uses its own GPS/GNSS location by default.
"""On a Notecard paired with a Starnote, this controls whether the Starnote uses a location known to the paired Notecard instead of acquiring one with its own GPS/GNSS module. It does not, by default. On Notecard for Skylo, the satellite radio and the GPS/GNSS are part of the same module. This request controls whether the Notecard uses a known location (typically a fixed location set with `card.location.mode`), instead of acquiring a new location for NTN use.

Args:
card (Notecard): The current Notecard object.
off (bool): When `true`, a paired Starnote will use its own GPS/GNSS location. This is the default configuration.
on (bool): When `true`, a Starnote will use the location known to its paired Notecard, instead of the Starnote's own GPS/GNSS module.
off (bool): When `true`, the Notecard does not supply its location to the NTN module. This is the default configuration.
on (bool): When `true`, the Notecard supplies its location to the NTN module. If the Notecard does not yet know its location, none is supplied, and this setting has no effect until a location becomes available.

Returns:
dict: The result of the Notecard request.
Expand Down