-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from fa21-collaborative-drone-interactions/feat…
…ure/sensor-names Provide sensor names on endpoint
- Loading branch information
Showing
14 changed files
with
31 additions
and
21 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 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,19 @@ | ||
import Apodini | ||
import Foundation | ||
|
||
|
||
struct Sensor: Handler { | ||
func handle() -> [SensorDescription] { | ||
readJSONFromFile([SensorType].self, filePath: "available_sensors.json")?.map { SensorDescription(type: $0) } ?? [] | ||
} | ||
} | ||
|
||
struct SensorDescription: Content { | ||
let name: String | ||
let type: SensorType | ||
|
||
init(type: SensorType) { | ||
self.type = type | ||
self.name = type.description | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.