You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					36 lines
				
				1.1 KiB
			
		
		
			
		
	
	
					36 lines
				
				1.1 KiB
			| 
								 
											5 years ago
										 
									 | 
							
								#pragma once
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								#include "system/hardware/base.h"
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								#include "common/util.h"
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								#if QCOM2
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								#include "system/hardware/tici/hardware.h"
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#define Hardware HardwareTici
							 | 
						||
| 
								 | 
							
								#else
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class HardwarePC : public HardwareNone {
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								  static std::string get_os_version() { return "openpilot for PC"; }
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								  static std::string get_name() { return "pc"; };
							 | 
						||
| 
								 | 
							
								  static cereal::InitData::DeviceType get_device_type() { return cereal::InitData::DeviceType::PC; };
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  static bool PC() { return true; }
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  static bool TICI() { return util::getenv("TICI", 0) == 1; }
							 | 
						||
| 
								 
											3 years ago
										 
									 | 
							
								  static bool AGNOS() { return util::getenv("TICI", 0) == 1; }
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								};
							 | 
						||
| 
								 | 
							
								#define Hardware HardwarePC
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#endif
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace Path {
							 | 
						||
| 
								 | 
							
								inline std::string log_root() {
							 | 
						||
| 
								 | 
							
								  if (const char *env = getenv("LOG_ROOT")) {
							 | 
						||
| 
								 | 
							
								    return env;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  return Hardware::PC() ? util::getenv("HOME") + "/.comma/media/0/realdata" : "/data/media/0/realdata";
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								inline std::string params() {
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  return Hardware::PC() ? util::getenv("HOME") + "/.comma/params" : "/data/params";
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								inline std::string rsa_file() {
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  return Hardware::PC() ? util::getenv("HOME") + "/.comma/persist/comma/id_rsa" : "/persist/comma/id_rsa";
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								}  // namespace Path
							 |