mirror of https://github.com/ArduPilot/ardupilot
AP_Common: change a few more "int" to "int16_t"
This commit is contained in:
parent
ea860126e0
commit
995b8a571b
|
@ -61,8 +61,8 @@ public:
|
||||||
private:
|
private:
|
||||||
const char *_name; ///< name of the current test
|
const char *_name; ///< name of the current test
|
||||||
bool _fail; ///< set if any ::require calls indicate the test failed
|
bool _fail; ///< set if any ::require calls indicate the test failed
|
||||||
static int _passed; ///< global pass count
|
static int16_t _passed; ///< global pass count
|
||||||
static int _failed; ///< global fail count
|
static int16_t _failed; ///< global fail count
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
|
@ -104,8 +104,8 @@ Test::report()
|
||||||
Serial.printf("\n%d passed %d failed\n", _passed, _failed);
|
Serial.printf("\n%d passed %d failed\n", _passed, _failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Test::_passed = 0;
|
int16_t Test::_passed = 0;
|
||||||
int Test::_failed = 0;
|
int16_t Test::_failed = 0;
|
||||||
|
|
||||||
/// Start a new test.
|
/// Start a new test.
|
||||||
///
|
///
|
||||||
|
|
|
@ -309,7 +309,7 @@ public:
|
||||||
return (*this)*(1/norm());
|
return (*this)*(1/norm());
|
||||||
}
|
}
|
||||||
// sum
|
// sum
|
||||||
const sumType sum(const size_t & start=0,const int & end=-1) const {
|
const sumType sum(const size_t & start=0,const int16_t & end=-1) const {
|
||||||
size_t end2;
|
size_t end2;
|
||||||
if (end==-1) end2=getSize()-1;
|
if (end==-1) end2=getSize()-1;
|
||||||
else end2=end;
|
else end2=end;
|
||||||
|
@ -317,7 +317,7 @@ public:
|
||||||
for (size_t i=start; i<=end2; i++) _sum += (*this)(i);
|
for (size_t i=start; i<=end2; i++) _sum += (*this)(i);
|
||||||
return _sum;
|
return _sum;
|
||||||
}
|
}
|
||||||
void sumFletcher(uint8_t & CK_A, uint8_t & CK_B, const size_t & start=0,const int & end=-1) const {
|
void sumFletcher(uint8_t & CK_A, uint8_t & CK_B, const size_t & start=0,const int16_t & end=-1) const {
|
||||||
size_t end2;
|
size_t end2;
|
||||||
if (end==-1) end2=getSize()-1;
|
if (end==-1) end2=getSize()-1;
|
||||||
else end2=end;
|
else end2=end;
|
||||||
|
|
Loading…
Reference in New Issue