Skip to content

Commit

Permalink
Merge pull request #110 from davefiddes/master
Browse files Browse the repository at this point in the history
Fix unit test build
  • Loading branch information
damienmaguire authored Sep 26, 2024
2 parents 6408be7 + ea2d384 commit 7d055fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

namespace utils
{
int32_t change(int32_t x, int32_t in_min, int32_t in_max, int32_t out_min, int32_t out_max);
inline int32_t change(int32_t x, int32_t in_min, int32_t in_max, int32_t out_min, int32_t out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

float GetUserThrottleCommand(CanHardware*);
float ProcessThrottle(int);
float ProcessUdc(int);
Expand Down
6 changes: 0 additions & 6 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ int32_t NetWh=0;

bool Timer1Run = false;


int32_t change(int32_t x, int32_t in_min, int32_t in_max, int32_t out_min, int32_t out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

void PostErrorIfRunning(ERROR_MESSAGE_NUM err)
{
if (Param::GetInt(Param::opmode) == MOD_RUN)
Expand Down

0 comments on commit 7d055fc

Please sign in to comment.