More superficial NXDN work.

This commit is contained in:
Jonathan Naylor
2018-01-11 20:59:32 +00:00
parent b2586654a2
commit fe7ee7884c
4 changed files with 43 additions and 127 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
#include "DMRDefines.h"
#include "YSFDefines.h"
#include "P25Defines.h"
#include "NXDNDefines.h"
#include <cstdio>
#include <cassert>
@@ -74,3 +75,11 @@ void CSync::addP25Sync(unsigned char* data)
::memcpy(data, P25_SYNC_BYTES, P25_SYNC_LENGTH_BYTES);
}
void CSync::addNXDNSync(unsigned char* data)
{
assert(data != NULL);
for (unsigned int i = 0U; i < NXDN_FSW_BYTES_LENGTH; i++)
data[i] = (data[i] & ~NXDN_FSW_BYTES_MASK[i]) | NXDN_FSW_BYTES[i];
}