Add model number to key.
David Blume

David Blume commited on 2019-09-11 20:37:10
Showing 3 changed files, with 9 additions and 6 deletions.

... ...
@@ -32,7 +32,7 @@
32 32
     m.updates = m.top.findNode("updates")
33 33
     m.updates.font.size=36
34 34
     m.updates.color="0x62EE97FF"
35
-    m.updates.translation = [60, 230]
35
+    m.updates.translation = [100, 230]
36 36
 
37 37
     m.tagTask = CreateObject("roSGNode", "TagTask")
38 38
     m.tagTask.ObserveField("updateText", "onUpdateText")
... ...
@@ -23,9 +23,12 @@ function getDeviceId(deviceInfo as object) as String
23 23
     request.SetUrl("http://localhost:8060/query/device-info")
24 24
     root = CreateObject("roXMLElement")
25 25
     if root.Parse(request.GetToString()) then
26
-        elements = root.GetNamedElements("serial-number")
27
-        if elements.Count() > 0
28
-            return elements[0].GetText()
26
+        serialnums = root.GetNamedElements("serial-number")
27
+        if serialnums.Count() > 0
28
+            model = root.GetNamedElements("model-number")
29
+            if model.Count() > 0
30
+                return serialnums[0].GetText() + ":" + model[0].GetText()
31
+	    end if
29 32
         end if
30 33
     end if
31 34
     ' That did not work, so make a custom one.
... ...
@@ -1,7 +1,7 @@
1 1
 title=IP Tagger
2 2
 major_version=2
3
-minor_version=1
4
-build_version=2
3
+minor_version=2
4
+build_version=0
5 5
 mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
6 6
 mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png
7 7
 splash_screen_hd=pkg:/images/splash_screen_hd.png
8 8