[4.4.2] Remove 15 m/s limit on estimated vario (#12788)
[betaflight.git] / src / main / pg / board.c
blobace8621eef9326964cc7070b41fba3438a235667
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include <stdbool.h>
22 #include <string.h>
24 #include "platform.h"
26 #if defined(USE_BOARD_INFO)
27 #include "build/version.h"
29 #include "fc/board_info.h"
31 #include "pg/pg.h"
32 #include "pg/pg_ids.h"
34 #include "board.h"
36 PG_REGISTER_WITH_RESET_FN(boardConfig_t, boardConfig, PG_BOARD_CONFIG, 0);
38 void pgResetFn_boardConfig(boardConfig_t *boardConfig)
40 if (boardInformationIsSet()) {
41 strncpy(boardConfig->manufacturerId, getManufacturerId(), MAX_MANUFACTURER_ID_LENGTH + 1);
42 strncpy(boardConfig->boardName, getBoardName(), MAX_BOARD_NAME_LENGTH + 1);
43 boardConfig->boardInformationSet = true;
44 } else {
45 boardConfig->boardInformationSet = false;
48 #if defined(USE_SIGNATURE)
49 if (signatureIsSet()) {
50 memcpy(boardConfig->signature, getSignature(), SIGNATURE_LENGTH);
51 boardConfig->signatureSet = true;
52 } else {
53 boardConfig->signatureSet = false;
55 #endif
57 #endif // USE_BOARD_INFO: