ChannelViewModel
class ChannelViewModel(radioController: RadioController, radioConfigRepository: RadioConfigRepository, analytics: PlatformAnalytics, snackbarManager: SnackbarManager) : ViewModel(source)
Constructors
Link copied to clipboard
constructor(radioController: RadioController, radioConfigRepository: RadioConfigRepository, analytics: PlatformAnalytics, snackbarManager: SnackbarManager)
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Parse a channel URL string and store the resulting ChannelSet.
Link copied to clipboard
Replaces the channels with the default one. The LoRa config is read from the repository here: localConfig holds its empty initial value unless something is collecting it, and the reset must keep the device's own settings. The default channel takes the region's first-setup preset (e.g. US -> LongTurbo) so its derived name, hash and frequency match what a freshly set-up node in that region would use.
Link copied to clipboard
Set the radio config (also updates our saved copy in preferences). A failure is reported with a snackbar that offers to retry the same write.
Link copied to clipboard