Remarks from Damjan in e8aaa67450 taken into account

This commit is contained in:
Bertrand Songis
2016-01-15 08:44:45 +01:00
parent d85ee61cb3
commit efb37a4419
5 changed files with 50 additions and 62 deletions
+20 -41
View File
@@ -1,23 +1,23 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "opentx.h"
#if !defined(CPUARM)
@@ -127,27 +127,6 @@ uint16_t isqrt32(uint32_t n)
-205 -> -21
-204 -> -20
*/
getvalue_t div10_and_round(getvalue_t value)
{
if (value >= 0 ) {
value += 5;
}
else {
value -= 5;
}
return value/10;
}
getvalue_t div100_and_round(getvalue_t value)
{
if (value >= 0 ) {
value += 50;
}
else {
value -= 50;
}
return value/100;
}
#if defined(PCBTARANIS)
double gpsToDouble(bool neg, int16_t bp, int16_t ap)