Skip to content

Commit

Permalink
* little cleanup
Browse files Browse the repository at this point in the history
* fixed wrong return value conversion
  • Loading branch information
wimalopaan committed Apr 26, 2022
1 parent ba6fc3d commit 3ec13af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radio/src/lua/api_general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static Fifo<uint8_t, LUA_FIFO_SIZE>* luaRxFifo = nullptr;

static bool luaRxFifoGetByte(void*, uint8_t* data)
{
if (!luaRxFifo) return -1;
if (!luaRxFifo) return false;
return luaRxFifo->pop(*data);
}

Expand Down
4 changes: 2 additions & 2 deletions radio/src/sbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
static bool (*_sbusAuxGetByte)(void*, uint8_t*) = nullptr;
static void* _sbusAuxGetByteCtx = nullptr;

void sbusSetAuxGetByte(void* ctx, bool (*fct)(void*, uint8_t*))
void sbusSetAuxGetByte(void* const ctx, bool (* const fct)(void*, uint8_t*))
{
_sbusAuxGetByteCtx = ctx;
_sbusAuxGetByte = fct;
}

bool sbusAuxGetByte(uint8_t* byte)
bool sbusAuxGetByte(uint8_t* const byte)
{
auto _getByte = _sbusAuxGetByte;
auto _ctx = _sbusAuxGetByteCtx;
Expand Down

0 comments on commit 3ec13af

Please sign in to comment.