-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update FlexApiProtocolDecoder #4829
Open
jackymlr
wants to merge
33
commits into
traccar:master
Choose a base branch
from
jackymlr:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6bcf572
fix: 4g network rsrp has higher priority than rssi.
e7ca53d
Merge pull request #1 from jackymlr/inVG
jackymlr 58cc814
fix: 4g network rsrp has higher priority than rssi.
a420350
Merge pull request #2 from jackymlr/inVG
jackymlr cacefc2
fix: 4g network rsrp has higher priority than rssi base 4.15.
8494949
feat: payload some attribute may be null.
5b4874b
feat: payload some attribute may be null.
c2239f7
feat: update start log
42285a7
Merge branch 'traccar:master' into master
jackymlr d205a22
chore: remove debug log.
b0581da
Merge branch 'master' into 4.15.1
jackymlr 0a4de58
Merge pull request #3 from jackymlr/4.15.1
jackymlr 94b8e5a
chore: format code.
846efb0
Update Main.java
jackymlr dbdcd67
Update FlexApiProtocolDecoderTest.java
jackymlr 467c804
chore: replace optional with if.
81008b6
chore: replace optional with if.
24e78de
Merge branch 'traccar:master' into master
jackymlr 460da9d
chore: replace optional with if.
f4290ac
chore: parse summary.
065145a
chore: add if.
5248ba9
chore: add test.
bb186c6
chore: fix npe.
c0e678a
chore: add try catch.
582977c
chore: merge master.
6858521
Merge branch 'traccar:master' into master
jackymlr cc93199
chore: merge master.
c83deec
Merge branch 'master' into 4.15.1
jackymlr 91f9639
Merge pull request #4 from jackymlr/4.15.1
jackymlr ab0ddca
chore: format code.
d584363
Update Main.java
jackymlr cae8be8
valid message completed
jackymlr 10c3162
chore: change ts to ul_ts.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,12 +33,10 @@ public void testDecode() throws Exception { | |
|
||
verifyAttributes(decoder, text( | ||
"${\"topic\":\"v1/VF3102021111601/sysinfo/info\",\"payload\":{\"sysinfo.ts\":1637224740,\"sysinfo.model_name\":\"310\",\"sysinfo.oem_name\":\"inhand\",\"sysinfo.serial_number\":\"VF3102021111601\",\"sysinfo.firmware_version\":\"VT3_V1.1.32\",\"sysinfo.product_number\":\"FQ58\",\"sysinfo.description\":\"www.inhand.com.cn\"}}xx")); | ||
|
||
verifyAttributes(decoder, text( | ||
"${\"topic\":\"v1/VF3102021111601/io/info\",\"payload\":{\"io.ts\":1637227722,\"io.AI1\":0,\"io.DI1\":1,\"io.DI2\":0,\"io.DI3\":0,\"io.DI4\":0,\"io.DI1_pullup\":0,\"io.DI2_pullup\":0,\"io.DI3_pullup\":0,\"io.DI4_pullup\":0,\"io.DO1\":0,\"io.DO2\":0,\"io.DO3\":0,\"io.IGT\":1}}xx")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you removing a test? |
||
|
||
verifyAttributes(decoder, text( | ||
"${\"topic\":\"v1/VF3102021111601/cellular1/info\",\"payload\":{\"modem1.ts\":1637225330,\"modem1.imei\":\"863674047324999\",\"modem1.imsi\":\"460111150414721\",\"modem1.iccid\":\"89860319482086580401\",\"modem1.phone_num\":\"\",\"modem1.signal_lvl\":25,\"modem1.reg_status\":1,\"modem1.operator\":\"46011\",\"modem1.network\":3,\"modem1.lac\":\"EA00\",\"modem1.cell_id\":\"E779B81\",\"modem1.rssi\":0,\"modem1.rsrp\":0,\"modem1.rsrq\":0,\"cellular1.status\":3,\"cellular1.ip\":\"10.136.143.193\",\"cellular1.netmask\":\"255.255.255.255\",\"cellular1.gateway\":\"10.64.64.64\",\"cellular1.dns1\":\"223.5.5.5\",\"cellular1.up_at\":450}}xx")); | ||
verifyAttributes(decoder, text( | ||
"${\"topic\": \"v1/VG7102021110801/io/info\", \"payload\": {\"io.ts\": 1646641456, \"io.DI1\": 0, \"io.DI2\": 0, \"io.DI3\": 0, \"io.DI4\": 0, \"io.DI1_pullup\": 0, \"io.DI2_pullup\": 0, \"io.DI3_pullup\": 0, \"io.DI4_pullup\": 0}}ن\n")); | ||
|
||
} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think this format is hard to read. If you want to do the check, I would recommend doing it explicitly.
Are you sure all the parameters you check for null are optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go confirm with firmware developer again.