-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error descriptions and string convertibles simplified
- Loading branch information
Showing
17 changed files
with
209 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2018 Nordic Semiconductor ASA. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
|
||
import Foundation | ||
import iOSMcuManagerLibrary | ||
|
||
extension PeripheralState: CustomStringConvertible { | ||
|
||
public var description: String { | ||
switch self { | ||
case .connecting: return "CONNECTING..." | ||
case .initializing: return "INITIALIZING..." | ||
case .connected: return "CONNECTED" | ||
case .disconnecting: return "DISCONNECTING..." | ||
case .disconnected: return "DISCONNECTED" | ||
} | ||
} | ||
|
||
} | ||
|
||
extension BootloaderInfoResponse.Mode: CustomStringConvertible { | ||
|
||
public var description: String { | ||
switch self { | ||
case .unknown: | ||
return "Unknown" | ||
case .singleApplication: | ||
return "Single application" | ||
case .swapUsingScratch: | ||
return "Swap using scratch partition" | ||
case .overwrite: | ||
return "Overwrite (upgrade-only)" | ||
case .swapNoScratch: | ||
return "Swap without scratch" | ||
case .directXIPNoRevert: | ||
return "Direct-XIP without revert" | ||
case .directXIPWithRevert: | ||
return "Direct-XIP with revert" | ||
case .RAMLoader: | ||
return "RAM Loader" | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.