mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_Periph: use flash app_descriptor
This commit is contained in:
parent
ec1060d4f8
commit
092c20b3a7
@ -51,17 +51,7 @@ static uint32_t start_ms;
|
||||
/*
|
||||
declare constant app_descriptor in flash
|
||||
*/
|
||||
const struct app_descriptor app_descriptor __attribute__((section(".app_descriptor"))) = {
|
||||
.sig = { 0x40, 0xa2, 0xe4, 0xf1, 0x64, 0x68, 0x91, 0x06 },
|
||||
.image_crc1 = 0,
|
||||
.image_crc2 = 0,
|
||||
.image_size = 0,
|
||||
.git_hash = 0,
|
||||
.version_major = AP::fwversion().major,
|
||||
.version_minor = AP::fwversion().minor,
|
||||
.board_id = APJ_BOARD_ID,
|
||||
.reserved = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
|
||||
};
|
||||
const struct app_descriptor app_descriptor __attribute__((section(".app_descriptor")));
|
||||
|
||||
void AP_Periph_FW::init()
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <AP_Airspeed/AP_Airspeed.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
#include <AP_Common/AP_FWVersion.h>
|
||||
#include "version.h"
|
||||
#include "../AP_Bootloader/app_comms.h"
|
||||
|
||||
#if defined(HAL_PERIPH_NEOPIXEL_COUNT) || defined(HAL_PERIPH_ENABLE_NCP5623_LED)
|
||||
|
@ -1,11 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef FORCE_VERSION_H_INCLUDE
|
||||
#error version.h should never be included directly. You probably want to include AP_Common/AP_FWVersion.h
|
||||
#endif
|
||||
|
||||
#include "ap_version.h"
|
||||
|
||||
#define THISFIRMWARE "AP_Periph V1.0dev"
|
||||
|
||||
// the following line is parsed by the autotest scripts
|
||||
|
Loading…
Reference in New Issue
Block a user