2016-09-24 07:42:22 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define HAL_BOARD_NAME "SITL"
|
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
|
2019-09-22 19:51:30 -03:00
|
|
|
#define HAL_MEM_CLASS HAL_MEM_CLASS_1000
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_OS_SOCKETS 1
|
2020-04-11 23:16:24 -03:00
|
|
|
|
|
|
|
#define AP_FLASHSTORAGE_TYPE 3
|
|
|
|
|
|
|
|
#if AP_FLASHSTORAGE_TYPE == 1
|
|
|
|
// emulate F1/F3 flash
|
|
|
|
#define HAL_STORAGE_SIZE 15360
|
|
|
|
#define HAL_FLASH_SECTOR_SIZE 16*1024
|
|
|
|
#define HAL_FLASH_MIN_WRITE_SIZE 1
|
|
|
|
#define HAL_FLASH_ALLOW_UPDATE 0
|
|
|
|
|
|
|
|
#elif AP_FLASHSTORAGE_TYPE == 2
|
|
|
|
// emulate F4/F7 flash
|
|
|
|
#define HAL_STORAGE_SIZE 15360
|
|
|
|
#define HAL_FLASH_SECTOR_SIZE 16*1024
|
|
|
|
#define HAL_FLASH_MIN_WRITE_SIZE 1
|
|
|
|
#define HAL_FLASH_ALLOW_UPDATE 1
|
|
|
|
|
|
|
|
#elif AP_FLASHSTORAGE_TYPE == 3
|
|
|
|
// emulate H7 flash
|
|
|
|
#define HAL_STORAGE_SIZE 16384
|
|
|
|
#define HAL_FLASH_SECTOR_SIZE 128*1024
|
|
|
|
#define HAL_FLASH_MIN_WRITE_SIZE 32
|
|
|
|
#define HAL_FLASH_ALLOW_UPDATE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_STORAGE_SIZE
|
2021-01-12 19:13:07 -04:00
|
|
|
#define HAL_STORAGE_SIZE 32768
|
2020-04-10 20:34:06 -03:00
|
|
|
#endif
|
2020-04-11 23:16:24 -03:00
|
|
|
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "terrain"
|
2017-02-08 21:48:35 -04:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH nullptr
|
2021-06-09 08:31:35 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_NONE
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_NONE
|
2016-09-24 07:42:22 -03:00
|
|
|
#define HAL_GPIO_A_LED_PIN 61
|
|
|
|
#define HAL_GPIO_B_LED_PIN 48
|
|
|
|
#define HAL_GPIO_C_LED_PIN 117
|
|
|
|
|
2017-03-20 14:57:14 -03:00
|
|
|
#define HAL_HAVE_BOARD_VOLTAGE 1
|
2018-11-10 17:41:29 -04:00
|
|
|
#define HAL_HAVE_SERVO_VOLTAGE 1
|
2023-07-07 00:27:26 -03:00
|
|
|
#define HAL_HAVE_SAFETY_SWITCH 1
|
2018-08-07 03:37:37 -03:00
|
|
|
|
2023-03-09 18:43:42 -04:00
|
|
|
// only include if compiling C++ code
|
|
|
|
#ifdef __cplusplus
|
2018-08-07 03:37:37 -03:00
|
|
|
// allow for static semaphores
|
|
|
|
#include <AP_HAL_SITL/Semaphores.h>
|
|
|
|
#define HAL_Semaphore HALSITL::Semaphore
|
2023-12-29 17:29:46 -04:00
|
|
|
#define HAL_BinarySemaphore HALSITL::BinarySemaphore
|
2023-03-09 18:43:42 -04:00
|
|
|
#endif
|
2020-05-31 09:09:21 -03:00
|
|
|
|
2020-05-31 09:12:02 -03:00
|
|
|
#ifndef HAL_NUM_CAN_IFACES
|
|
|
|
#define HAL_NUM_CAN_IFACES 0
|
|
|
|
#endif
|
2020-05-31 09:09:21 -03:00
|
|
|
|
2018-11-15 21:06:08 -04:00
|
|
|
#ifndef HAL_BOARD_STORAGE_DIRECTORY
|
|
|
|
#define HAL_BOARD_STORAGE_DIRECTORY "."
|
|
|
|
#endif
|
|
|
|
|
2021-05-04 08:12:23 -03:00
|
|
|
#ifndef HAL_HAVE_HARDWARE_DOUBLE
|
|
|
|
#define HAL_HAVE_HARDWARE_DOUBLE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_WITH_EKF_DOUBLE
|
|
|
|
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
|
|
|
|
#endif
|
2023-01-11 03:37:17 -04:00
|
|
|
|
|
|
|
#ifndef HAL_CAN_DRIVER_DEFAULT
|
2023-04-27 02:26:18 -03:00
|
|
|
#define HAL_CAN_DRIVER_DEFAULT 0
|
2023-01-11 03:37:17 -04:00
|
|
|
#endif
|
2023-06-26 06:51:48 -03:00
|
|
|
|
|
|
|
#ifndef AP_UART_MONITOR_ENABLED
|
|
|
|
#define AP_UART_MONITOR_ENABLED 1
|
|
|
|
#endif
|
2023-09-19 13:41:04 -03:00
|
|
|
|
|
|
|
#ifndef AP_FILTER_ENABLED
|
|
|
|
#define AP_FILTER_ENABLED 1
|
|
|
|
#endif
|