This file contains hidden or 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
func loadVehicleImage() -> () { | |
if (!TeslaController.shared().vehicleBackgroundEnabled) { | |
self.vehicleImage = UIImage() | |
return | |
} | |
//TODO: Currently only show background images for 3 and Y - S and X require more option codes... | |
if self.vehicleData?.vehicle_config?.car_type == "model3" || self.vehicleData?.vehicle_config?.car_type == "modely" | |
{ | |
let networking = Networking(baseURL: "https://static-assets.tesla.com") | |
networking.downloadImage("/v1/compositor/?model=\(carTypeToCode(self.vehicleData?.vehicle_config?.car_type))&view=STUD_3QTR&size=400&bkba_opt=1&options=\(colorNameToCode(self.vehicleData?.vehicle_config?.exterior_color)),\(wheelTypeToCode(self.vehicleData?.vehicle_config?.wheel_type))") { result in |