mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 22:45:31 +00:00
Add more asserts to catch bugs.
This commit is contained in:
parent
14c6208ae5
commit
12fb99c00a
12 changed files with 92 additions and 4 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "Sync.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <ctime>
|
||||
|
||||
|
|
@ -58,6 +59,8 @@ CYSFControl::~CYSFControl()
|
|||
|
||||
bool CYSFControl::writeModem(unsigned char *data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
unsigned char type = data[0U];
|
||||
|
||||
if (type == TAG_LOST && m_state == RS_RF_AUDIO) {
|
||||
|
|
@ -215,6 +218,8 @@ bool CYSFControl::writeModem(unsigned char *data)
|
|||
|
||||
unsigned int CYSFControl::readModem(unsigned char* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
if (m_queue.isEmpty())
|
||||
return 0U;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue