Die JLog App finde ich sehr interessant. Wird die auch für den JLog S32 funktionieren?
Hallo Mario,
leider nein, weil der Sting "JLog2.6" die automatische Auswahl bewirkt.
Möglicherweise ist auch die Reihenfolge der übertragenen Parameter anders.
Ist aber kein Hexenwerk das anzupassen.
Einfach diesen Text in eine Datei namens blabla.lua tun
und nach Apps kopieren.
local function init()
local sensors = system.getSensors()
for i,sensor in ipairs(sensors) do
if ( sensor.param == 0) then
print (string.format("label: %s ID: %d",sensor.label, sensor.id))
else
print ("label: " .. sensor.label .. " ID: " .. sensor.id .. " type: " .. sensor.type .. " param: ".. sensor.param .. " value: " .. sensor.value .. " unit: " .. sensor.unit .. " name: " .. sensor.sensorName)
end
end
end
return {init=init, author="niemand", version="0.0"}
Dann bekommt man, nach Auswahl der Benutzerapp blabla auf der Console (cmd drücken) im Sender eine Ausgabe wie
label: JLog2.6 ID: 34120706
label: U battery ID: 34120706 type: 1 param: 1 value: 0,0 unit: V name: JLog2.6
label: I motor ID: 34120706 type: 1 param: 2 value: 0,0 unit: A name: JLog2.6
label: RPM uni ID: 34120706 type: 4 param: 3 value: 0,0 unit: rpm name: JLog2.6
label: mAh ID: 34120706 type: 4 param: 4 value: 0,0 unit: mAh name: JLog2.6
label: U bec ID: 34120706 type: 1 param: 5 value: 0,0 unit: V name: JLog2.6
label: I bec ID: 34120706 type: 1 param: 6 value: 0,0 unit: A name: JLog2.6
label: Throttle ID: 34120706 type: 1 param: 7 value: 0,0 unit: % name: JLog2.6
label: PWM ID: 34120706 type: 1 param: 8 value: 0,0 unit: % name: JLog2.6
label: Temp FET ID: 34120706 type: 1 param: 9 value: 0,0 unit: °C name: JLog2.6
label: RPM mot ID: 34120706 type: 4 param: 10 value: 0,0 unit: rpm name: JLog2.6
label: Ubat Min ID: 34120706 type: 1 param: 11 value: 0,0 unit: V name: JLog2.6
label: Ubec Min ID: 34120706 type: 1 param: 12 value: 0,0 unit: V name: JLog2.6
label: Imot Max ID: 34120706 type: 1 param: 13 value: 0,0 unit: A name: JLog2.6
label: Ibec Max ID: 34120706 type: 1 param: 14 value: 0,0 unit: A name: JLog2.6
label: Power Max ID: 34120706 type: 4 param: 15 value: 0,0 unit: W name: JLog2.6
Das Hauptlabel oben (JLog2.6) ist der fragliche String.
Die Zahlen hinter param: sind die Zahlen wie die "1" in:
system.getSensorValueByID(sensorId, 1)
Gruß
Dieter