Skip to content

Commit 4331297

Browse files
author
David Sommerseth
committed
Completed python XML map for TypeMap 0x1C
1 parent 886fecb commit 4331297

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

src/dmidecode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3294,7 +3294,7 @@ void dmi_temperature_probe_resolution(xmlNode *node, u16 code)
32943294
dmixml_AddAttribute(data_n, "unknown", "1");
32953295
} else {
32963296
dmixml_AddAttribute(data_n, "unit", "C");
3297-
dmixml_AddTextContent(data_n, "%.3f deg C", (float)code / 1000);
3297+
dmixml_AddTextContent(data_n, "%.3f", (float)code / 1000);
32983298
}
32993299
}
33003300

src/pymap.xml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,31 @@
639639
</Map>
640640
</TypeMap>
641641

642-
<!-- FIXME : Type 28 : Temperature Probe -->
642+
<!-- Type 28 : Temperature Probe -->
643643
<TypeMap id="0x1C">
644+
<Map rootpath="/dmidecode/Probe[@probetype='Temperature']" keytype="string" key="@handle" valuetype="dict">
645+
<Map keytype="constant" key="dmi_type" valuetype="integer" value="@type"/>
646+
<Map keytype="constant" key="dmi_handle" valuetype="string" value="@handle"/>
647+
<Map keytype="constant" key="dmi_size" valuetype="integer" value="@size"/>
648+
<Map keytype="constant" key="data" valuetype="dict">
649+
<Map keytype="constant" key="Accuracy"
650+
valuetype="string" value="concat(Accuracy,' ',Accuracy/@unit)" emptyValue="Unknown"/>
651+
<Map keytype="constant" key="Description"
652+
valuetype="string" value="Description"/>
653+
<Map keytype="constant" key="Location"
654+
valuetype="string" value="Location"/>
655+
<Map keytype="constant" key="Maximum Value"
656+
valuetype="string" value="concat(MaxValue,' deg ',MaxValue/@unit)"/>
657+
<Map keytype="constant" key="Minimum Value"
658+
valuetype="string" value="concat(MinValue,' deg ',MinValue/@unit)"/>
659+
<Map keytype="constant" key="OEM-specific Information"
660+
valuetype="string" value="OEMinformation"/>
661+
<Map keytype="constant" key="Resolution"
662+
valuetype="string" value="concat(Resolution,' deg ',Resolution/@unit)"/>
663+
<Map keytype="constant" key="Status" valuetype="string" value="Status"/>
664+
<Map keytype="constant" key="Tolerance" valuetype="string" value="Tolerance" emptyValue="Unknown"/>
665+
</Map>
666+
</Map>
644667
</TypeMap>
645668

646669
<!-- FIXME : Type 29 : Electrical Current Probe -->

0 commit comments

Comments
 (0)