Skip to content

Commit d68cabe

Browse files
version v1.0.1804.1. Include support for $z and > 240pts configuration. Tested at 512pts.
1 parent cff0e6a commit d68cabe

13 files changed

Lines changed: 71 additions & 46 deletions

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=RFExplorer 3GP IoT
2-
version=1.0.1703
2+
version=1.0.1804
33
author=RFExplorer Team
44
maintainer=RF Explorer Team <contact@rf-explorer.com>
55
sentence=Library reference for RFExplorer 3GP IoT

src/ByteBuffer_RFE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//Arduino Buffered Serial
66
//A library that helps establish buffered serial communication with a

src/ByteBuffer_RFE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//Arduino Buffered Serial
66
//A library that helps establish buffered serial communication with a

src/CommonValues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright � 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright � 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public

src/ErrorCodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public

src/RFEConfiguration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright � 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright � 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public

src/RFEConfiguration.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright � 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright � 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public
@@ -35,8 +35,10 @@ enum eModel
3535
MODEL_2400, //4
3636
MODEL_WSUB3G, //5
3737
MODEL_6G, //6
38+
39+
MODEL_WSUB1G_PLUS = 10, //10
3840

39-
MODEL_RFGEN=60, //60
41+
MODEL_RFGEN = 60, //60
4042
MODEL_NONE = 0xFF //0xFF
4143
};
4244

@@ -53,11 +55,11 @@ enum eMode
5355
enum eCalculator
5456
{
5557
NORMAL = 0,
56-
MAX = 1,
57-
AVG = 2,
58-
OVERWRITE = 3,
59-
MAX_HOLD = 4,
60-
MAX_HISTORICAL = 5,
58+
MAX,
59+
AVG,
60+
OVERWRITE,
61+
MAX_HOLD,
62+
MAX_HISTORICAL,
6163
UNKNOWN = 0xff
6264
};
6365

src/RFESweepData.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public
@@ -46,12 +46,21 @@ uint8_t RFESweepData::processReceivedString(char* pLine, uint8_t* pLastMessage)
4646
uint8_t nReturnCode = _RFE_SUCCESS;
4747

4848
uint16_t nSizeString = strlen(pLine);
49+
uint8_t nAmplitudePosition = 3;
50+
51+
//Note that pLine[2] may contains 0x00
52+
if ('z' == pLine[1])
53+
{
54+
nSizeString = strlen(pLine + 4) + 4;
55+
nAmplitudePosition = 4;
56+
}
4957

5058
if (nSizeString >= 2)
5159
{
52-
if ((StartWith(pLine,"$s") && (nSizeString - 3 == (pLine[2] * 16))) || (StartWith(pLine,"$S") && (nSizeString - 3 == pLine[2])))
60+
if ((StartWith(pLine,"$s") && (nSizeString - 3 == (pLine[2] * 16))) || (StartWith(pLine,"$S") && (nSizeString - 3 == pLine[2]))
61+
|| (StartWith(pLine,"$z") && (nSizeString - 4 == (pLine[3] + pLine[2] * 256))))
5362
{
54-
memcpy(m_arrAmplitude, pLine + 3, m_nTotalSteps);
63+
memcpy(m_arrAmplitude, pLine + nAmplitudePosition, m_nTotalSteps);
5564
m_bValid = true;
5665
*pLastMessage = _SWEEP_MESSAGE;
5766
}

src/RFESweepData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public

src/RFEUtilities.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//============================================================================
22
//RF Explorer 3G+ IoT for Arduino - A Spectrum Analyzer for everyone!
3-
//Copyright © 2010-17 Ariel Rocholl, www.rf-explorer.com
3+
//Copyright © 2010-18 Ariel Rocholl, www.rf-explorer.com
44
//
55
//This application is free software; you can redistribute it and/or
66
//modify it under the terms of the GNU Lesser General Public
@@ -26,8 +26,7 @@ boolean StartWith(char*pLine, const char* pLineCompare)
2626

2727
char * strcat(char * pLine, char cCharacter)
2828
{
29-
uint16_t nSizeString = strlen(pLine);
30-
pLine[nSizeString] = cCharacter;
31-
pLine[nSizeString + 1] = '\0';
29+
pLine[0] = cCharacter;
30+
pLine[1] = '\0';
3231
return pLine;
3332
}

0 commit comments

Comments
 (0)