summaryrefslogtreecommitdiffstats
path: root/xml/test
diff options
context:
space:
mode:
authornicolas.zilio@hotmail.fr <>2015-09-14 15:49:46 +0200
committernicolas.zilio@hotmail.fr <>2015-09-14 15:49:46 +0200
commita1bf5e300e2345b642d0a13e7e26d22c56156e47 (patch)
tree35f55b62ab50bfbbb47bd8911aa3ca24c405e0a1 /xml/test
parent2dfb23016c39a331bf5ed4111b630dffa330edbb (diff)
downloadpcitool-a1bf5e300e2345b642d0a13e7e26d22c56156e47.tar.gz
pcitool-a1bf5e300e2345b642d0a13e7e26d22c56156e47.tar.bz2
pcitool-a1bf5e300e2345b642d0a13e7e26d22c56156e47.tar.xz
pcitool-a1bf5e300e2345b642d0a13e7e26d22c56156e47.zip
views with units functionnal (beware, as formulas are completely crap now, we could get segfault, for example if we want to write a negative value in register)
Diffstat (limited to 'xml/test')
-rw-r--r--xml/test/camera.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/xml/test/camera.xml b/xml/test/camera.xml
index bf26d80..ed01014 100644
--- a/xml/test/camera.xml
+++ b/xml/test/camera.xml
@@ -491,4 +491,38 @@
<description>enum towards cmosis_exp_register register</description>
</view>
</views>
+ <units>
+ <unit name="C">
+ <convert_unit value="K">@self+273.15</convert_unit>
+ <convert_unit value="F">@self*(9./5)+32</convert_unit>
+ </unit>
+ <unit name="K">
+ <convert_unit value="C">@self-273.15</convert_unit>
+ <convert_unit value="F">(@self-273.15)*(9./5)+32</convert_unit>
+ </unit>
+ <unit name="F">
+ <convert_unit value="C">(@self-32)*5./9</convert_unit>
+ <convert_unit value="K">(@self+273.15-32)*5./9</convert_unit>
+ </unit>
+ <unit name="s">
+ <convert_unit value="ms">@self*1000</convert_unit>
+ <convert_unit value="us">@self*1000000</convert_unit>
+ <convert_unit value="ns">@self*1000000000</convert_unit>
+ </unit>
+ <unit name="ms">
+ <convert_unit value="s">@self/1000</convert_unit>
+ <convert_unit value="us">@self*1000</convert_unit>
+ <convert_unit value="ns">@self*1000000</convert_unit>
+ </unit>
+ <unit name="us">
+ <convert_unit value="s">@self/1000000</convert_unit>
+ <convert_unit value="ms">@self/1000</convert_unit>
+ <convert_unit value="ns">@self*1000</convert_unit>
+ </unit>
+ <unit name="ns">
+ <convert_unit value="s">@self/1000000000</convert_unit>
+ <convert_unit value="ms">@self/1000000</convert_unit>
+ <convert_unit value="us">@self/1000</convert_unit>
+ </unit>
+ </units>
</model>