Watch
0
0
Fork
You've already forked esp32-c_its-companion
0

Compare commits

..
Author SHA1 Message Date
Jannik Beyerstedt
d1dc07b7e9 denm: Show warning symbol 2026-10-12 16:24:19 +02:00
17 changed files with 1064 additions and 245267 deletions

View file

@ -146,7 +146,10 @@ Images are loaded as TGA assets, but shall not have an alpha channel.
You can convert them using [ImageMagick](https://imagemagick.org) like this: You can convert them using [ImageMagick](https://imagemagick.org) like this:
```shell ```shell
# resize to 25px height, adding a black background to the white symbol and vice versa # resize to 25px height, adding a black background to the white symbol and vice versa
magick Sinnbild_Radfahrer_StVO_1992-200px-white.png -resize x25 -background black -alpha background -flatten -alpha off -verbose Sinnbild_Radfahrer_StVO_1992-25px-white.tga magick Sinnbild_Radfahrer_StVO_1992-200px-white.png -resize x25 -background black -alpha background -flatten -alpha off -colorspace Gray -verbose Sinnbild_Radfahrer_StVO_1992-25px-white.tga
magick Sinnbild_Radfahrer_StVO_1992-200px-black.png -resize x25 -background white -alpha background -flatten -alpha off -verbose Sinnbild_Radfahrer_StVO_1992-25px-black.tga magick Sinnbild_Radfahrer_StVO_1992-200px-black.png -resize x25 -background white -alpha background -flatten -alpha off -colorspace Gray -verbose Sinnbild_Radfahrer_StVO_1992-25px-black.tga
```
magick Stationary_Emergency_Vehicle-140x105.svg -resize 70 -background black -alpha background -flatten -alpha off -colorspace Gray -verbose Stationary_Emergency_Vehicle-70px.tga
magick Stationary_Vehicle-140x70.svg -resize 80 -background black -alpha background -flatten -alpha off -colorspace Gray -verbose Stationary_Vehicle-80px.tga
magick Work_Zone-140x95.svg -resize 80 -background black -alpha background -flatten -alpha off -colorspace Gray -verbose Work_Zone-80px.tga
```

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 140 105" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(0.8551,0,0,0.8551,12.5273,9.81292)">
<g transform="matrix(1,0,0,1,-80,-100)">
<path d="M124.75,104.64L139.96,104.64L139.96,114.39L115,114.39C115,109.01 119.37,104.64 124.75,104.64Z" style="fill:rgb(6,42,56);fill-rule:nonzero;"/>
<g transform="matrix(-1,7.65714e-16,-7.65714e-16,-1,334.84,219.02)">
<path d="M154.94,104.64L179.9,104.64L179.9,114.39L164.69,114.39C159.31,114.39 154.94,110.02 154.94,104.64Z" style="fill:rgb(6,42,56);fill-rule:nonzero;"/>
</g>
<rect x="143.29" y="104.64" width="8.32" height="9.75" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(1,0,0,1,-80,-100)">
<g transform="matrix(0.707107,-0.707107,0.707107,0.707107,-35.6,105.1)">
<path d="M111.13,89.64C111.13,88.503 110.207,87.58 109.07,87.58C107.933,87.58 107.01,88.503 107.01,89.64L107.01,101.42C107.01,102.557 107.933,103.48 109.07,103.48C110.207,103.48 111.13,102.557 111.13,101.42L111.13,89.64Z" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(0.202616,-0.979258,0.979258,0.202616,-25.44,186.41)">
<path d="M103.82,102.94C103.82,101.803 102.897,100.88 101.76,100.88C100.623,100.88 99.7,101.803 99.7,102.94L99.7,114.72C99.7,115.857 100.623,116.78 101.76,116.78C102.897,116.78 103.82,115.857 103.82,114.72L103.82,102.94Z" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(0.474856,-0.880063,0.880063,0.474856,-34.67,142.49)">
<path d="M104.12,91.58C104.12,90.443 103.197,89.52 102.06,89.52C100.923,89.52 100,90.443 100,91.58L100,109.01C100,110.147 100.923,111.07 102.06,111.07C103.197,111.07 104.12,110.147 104.12,109.01L104.12,91.58Z" style="fill:rgb(6,42,56);"/>
</g>
</g>
<g transform="matrix(1,0,0,1,-80,-100)">
<g transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,248.85,293.42)">
<path d="M187.25,89.28C187.25,88.143 186.327,87.22 185.19,87.22C184.053,87.22 183.13,88.143 183.13,89.28L183.13,101.06C183.13,102.197 184.053,103.12 185.19,103.12C186.327,103.12 187.25,102.197 187.25,101.06L187.25,89.28Z" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(-0.202616,-0.979258,0.979258,-0.202616,125.31,318.97)">
<path d="M194.57,102.58C194.57,101.443 193.647,100.52 192.51,100.52C191.373,100.52 190.45,101.443 190.45,102.58L190.45,114.36C190.45,115.497 191.373,116.42 192.51,116.42C193.647,116.42 194.57,115.497 194.57,114.36L194.57,102.58Z" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(-0.474856,-0.880063,0.880063,-0.474856,195.52,316.54)">
<path d="M194.27,91.22C194.27,90.083 193.347,89.16 192.21,89.16C191.073,89.16 190.15,90.083 190.15,91.22L190.15,108.65C190.15,109.787 191.073,110.71 192.21,110.71C193.347,110.71 194.27,109.787 194.27,108.65L194.27,91.22Z" style="fill:rgb(6,42,56);"/>
</g>
</g>
<g transform="matrix(1,0,0,1,-80,-100)">
<path d="M228.44,151.07L227.96,149.49C227.29,147.32 225,146.11 222.84,146.77L212.64,149.89C208.96,142.35 205.28,134.8 201.6,127.26C198.6,121.1 192.16,117.17 185.09,117.17L108.38,117.17C104.65,117.17 101.1,118.26 98.14,120.2C95.44,121.96 93.23,124.42 91.82,127.38C90.32,130.52 88.82,133.67 87.31,136.81C86.19,139.15 85.08,141.49 83.96,143.83C83.01,145.81 82.06,147.8 81.11,149.78L71.28,146.78C69.11,146.11 66.82,147.33 66.16,149.5L65.68,151.08C64.47,155.03 66.69,159.2 70.64,160.41L77.53,162.52L77.53,202.19C77.53,207 81.58,210.89 86.58,210.89L94.57,210.89C99.57,210.89 103.62,207 103.62,202.19L103.62,191.17L190.15,191.17L190.15,202.19C190.15,207 194.2,210.89 199.2,210.89L207.2,210.89C212.19,210.89 216.25,207 216.25,202.19L216.25,162.62L223.49,160.41C227.44,159.2 229.66,155.02 228.45,151.08L228.44,151.07ZM91.82,143.83C93.01,141.49 94.2,139.15 95.39,136.81C96.02,135.58 96.65,134.34 97.28,133.11C99.32,129.1 103.56,126.56 108.2,126.56L184.62,126.56C189.09,126.56 193.2,128.92 195.33,132.71C199.14,139.5 202.94,146.29 206.75,153.08L87.11,153.08C88.68,150 90.25,146.92 91.82,143.84L91.82,143.83ZM207.8,182.49L85.79,182.49L85.79,168.94L96.55,168.94C99.62,168.94 102.53,167.58 104.42,165.25C105.31,164.16 106.2,163.06 107.1,161.96L186.75,161.96C187.61,163.06 188.46,164.17 189.32,165.27C191.21,167.59 194.11,168.96 197.18,168.96L207.8,168.96L207.8,182.49Z" style="fill:rgb(3,42,56);fill-rule:nonzero;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 140 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:10;">
<g transform="matrix(0.663916,0,0,0.663916,21.159,-2.63741)">
<g transform="matrix(1,0,0,1,-80,-95)">
<path d="M240.68,135.74L240.2,134.16C239.53,132 237.25,130.78 235.08,131.45L224.9,134.56C221.22,127.03 217.55,119.49 213.88,111.96C210.88,105.81 204.46,101.88 197.4,101.88L120.8,101.88C117.07,101.88 113.53,102.97 110.57,104.91C107.87,106.67 105.67,109.12 104.26,112.08C102.76,115.21 101.26,118.36 99.76,121.49C98.64,123.83 97.53,126.17 96.41,128.5C95.47,130.49 94.52,132.47 93.57,134.45L83.75,131.45C81.59,130.78 79.3,132 78.64,134.16L78.15,135.74C76.95,139.68 79.17,143.85 83.11,145.06L89.99,147.16L89.99,157.58L90.04,157.5L91.03,159.15L91.74,160.34L92.41,161.47L93.27,162.89L93.75,163.7L95.13,166.02L96.51,168.33L96.98,169.11L98.39,171.48L102.81,178.88L103.42,179.91L105.86,184.01L108.18,187.88L109.21,189.59L109.29,189.73L109.89,190.74L110.02,190.97L110.63,192L111.08,192.72L105.9,192.72L106.43,193.6L107.46,195.31L107.54,195.45C107.95,195.43 108.36,195.38 108.76,195.3C110.12,195.04 111.38,194.49 112.45,193.7C113.76,192.76 114.79,191.47 115.4,189.98C115.82,188.99 116.04,187.91 116.04,186.78L116.04,175.77L202.45,175.77L202.45,186.78C202.45,191.58 206.5,195.47 211.48,195.47L219.46,195.47C224.45,195.47 228.49,191.58 228.49,186.78L228.49,147.27L235.72,145.06C239.67,143.85 241.88,139.68 240.68,135.74ZM104.26,128.5C105.45,126.17 106.64,123.83 107.83,121.49C108.45,120.26 109.08,119.03 109.71,117.8C111.75,113.79 115.98,111.25 120.62,111.25L196.93,111.25C201.4,111.25 205.5,113.61 207.62,117.4C211.42,124.17 215.22,130.96 219.03,137.74L99.55,137.74C101.12,134.66 102.69,131.58 104.26,128.5ZM220.06,167.11L98.24,167.11L98.24,153.58L108.98,153.58C112.04,153.58 114.94,152.21 116.83,149.89C117.72,148.8 118.61,147.7 119.51,146.61L199.04,146.61C199.9,147.71 200.75,148.81 201.6,149.92C203.49,152.24 206.39,153.6 209.46,153.6L220.06,153.6L220.06,167.11Z" style="fill:rgb(6,42,56);fill-rule:nonzero;"/>
</g>
<g transform="matrix(1,0,0,1,-80,-95)">
<path d="M259,198.485C259,196.821 257.649,195.47 255.985,195.47L51.145,195.47C49.481,195.47 48.13,196.821 48.13,198.485C48.13,200.149 49.481,201.5 51.145,201.5L255.985,201.5C257.649,201.5 259,200.149 259,198.485Z" style="fill:rgb(6,42,56);"/>
</g>
<g transform="matrix(1,0,0,1,-80,-95)">
<path d="M116.36,193.27L114.75,190.57L114.4,189.98L113.75,188.89L113.2,187.98L112.42,186.67L111.04,184.36L110.83,184.01L110.4,183.27L110.2,182.94L109.94,182.5L108.59,180.26L108.56,180.19L107.78,178.88L107.18,177.87L101.95,169.11L100.75,167.11L97.39,161.48L97.24,161.23L95.98,159.12L95.5,158.32L92.75,153.71L92.27,152.89L91.73,152.01L91.65,151.86C91.57,151.74 91.5,151.63 91.41,151.52C91.22,151.29 90.99,151.08 90.74,150.92C90.63,150.84 90.51,150.78 90.39,150.72C90.28,150.65 90.15,150.59 90.03,150.56C89.7,150.44 89.37,150.39 89.04,150.39L88.99,150.39C88.87,150.39 88.76,150.39 88.65,150.42C87.74,150.54 86.92,151.06 86.45,151.86L83.59,156.66L79.21,163.99L77.49,166.86L76.46,168.6L75.6,170.03L75.41,170.37L75.03,170.99L74.88,171.25L74.4,172.04L73.36,173.79L73.07,174.27L72.47,175.29L71.95,176.16L64.54,188.58L63.81,189.79L63.4,190.47L62.58,191.84L62.56,191.87L61.93,192.93L61.73,193.27C61.59,193.51 61.47,193.77 61.4,194.04C61.06,195.3 61.56,196.74 62.88,197.49C63.33,197.75 63.86,197.85 64.39,197.85L113.72,197.85C114.24,197.85 114.77,197.75 115.22,197.49C116.81,196.56 117.2,194.65 116.36,193.27ZM68.02,192.72L68.17,192.48L68.46,192L69.36,190.47L69.77,189.79L70.65,188.32L71.95,186.15L73.16,184.1L75.03,180.97L75.35,180.43L76.58,178.38L77.79,176.34L79.8,172.97L88.65,158.15L88.99,157.58L89.04,157.5L90.03,159.15L90.74,160.34L91.41,161.47L92.27,162.89L92.75,163.7L94.13,166.02L95.51,168.33L95.98,169.11L97.39,171.48L101.81,178.88L102.42,179.91L104.86,184.01L107.18,187.88L108.21,189.59L108.29,189.73L108.89,190.74L109.02,190.97L109.63,192L110.08,192.72L68.02,192.72Z" style="fill:rgb(229,37,33);fill-rule:nonzero;stroke:rgb(229,37,33);stroke-width:1px;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 140 95" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:10;">
<g transform="matrix(0.92789,0,0,0.92789,2.46819,-3.53846)">
<g transform="matrix(1,0,0,1,-80,-95)">
<path d="M228.22,197.555C228.22,196.443 227.317,195.54 226.205,195.54L79.355,195.54C78.243,195.54 77.34,196.443 77.34,197.555C77.34,198.667 78.243,199.57 79.355,199.57L226.205,199.57C227.317,199.57 228.22,198.667 228.22,197.555Z" style="fill:rgb(3,42,56);stroke:rgb(6,42,56);stroke-width:0.56px;"/>
</g>
<g transform="matrix(1,0,0,1,-80,-95)">
<path d="M156.61,180.13C147.09,185.13 143.69,185.08 139.62,198.04L205.13,198.17C197.76,185.28 189.65,171.17 182.28,158.27C170.92,161.28 163.58,176.47 156.61,180.12L156.61,180.13Z" style="fill:rgb(3,42,56);"/>
<path d="M207.75,180.01C217.27,185.01 220.67,184.96 224.74,197.92L159.23,198.05C166.6,185.16 174.71,171.05 182.08,158.15C193.44,161.16 200.78,176.35 207.75,180L207.75,180.01Z" style="fill:rgb(3,42,56);"/>
<path d="M93.79,138.45L101.05,142.7L108.33,125.98L101.41,125.98L93.79,138.45ZM114.43,149.99L125.12,155.96L120.28,139.5L114.43,149.99ZM136.37,162.25L182.76,188.17L180.08,192.98L130.39,165.22C129.56,165 128.79,164.57 128.16,163.97L88.05,141.57C87.46,141.46 86.88,141.24 86.34,140.91C83.94,139.45 83.18,136.32 84.64,133.92L94.21,118.25C95.17,116.68 96.84,115.82 98.55,115.81C100.26,115.8 115.41,115.81 115.41,115.81C120.29,115.81 124.37,115.64 125.74,121.99L136.56,158.88C136.9,160.04 136.8,161.23 136.37,162.26L136.37,162.25Z" style="fill:rgb(3,42,56);"/>
<path d="M108.45,160.8L108.72,168.61L108.76,170.18L107.93,171.48L93.92,193.17C92.42,195.48 89.33,196.15 87.03,194.66L86.87,194.56C85.71,193.81 84.98,192.76 84.69,191.41C84.39,190.07 84.62,188.8 85.37,187.64L98.53,167.26L98.31,155.22L108.46,160.78L108.45,160.8Z" style="fill:rgb(3,42,56);"/>
<path d="M138.32,116.08C142.02,112.38 142.16,106.5 138.64,102.99C135.12,99.47 129.24,99.61 125.55,103.31C121.86,107.01 121.71,112.89 125.23,116.4C128.75,119.91 134.63,119.77 138.32,116.08Z" style="fill:rgb(3,42,56);"/>
<path d="M99.53,154.37C97.18,153.03 96.36,150.04 97.69,147.7C99.02,145.34 102.02,144.52 104.37,145.85L129.8,160.3C131.45,161.23 132.35,162.98 132.28,164.75L132.53,192.46C132.55,195.16 130.37,197.37 127.67,197.39C124.97,197.41 122.76,195.24 122.73,192.53L122.51,167.42L99.53,154.36L99.53,154.37Z" style="fill:rgb(3,42,56);"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
graphics/Work_Zone-80px.tga Normal file

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"board": { "board": {
"active_layer": 0, "active_layer": 25,
"active_layer_preset": "", "active_layer_preset": "",
"auto_track_width": true, "auto_track_width": true,
"hidden_netclasses": [], "hidden_netclasses": [],

View file

@ -236,7 +236,6 @@
{ {
"td_allow_use_two_tracks": true, "td_allow_use_two_tracks": true,
"td_curve_segcount": 0, "td_curve_segcount": 0,
"td_enabled": false,
"td_height_ratio": 1.0, "td_height_ratio": 1.0,
"td_length_ratio": 0.5, "td_length_ratio": 0.5,
"td_maxheight": 2.0, "td_maxheight": 2.0,
@ -248,7 +247,6 @@
{ {
"td_allow_use_two_tracks": true, "td_allow_use_two_tracks": true,
"td_curve_segcount": 0, "td_curve_segcount": 0,
"td_enabled": false,
"td_height_ratio": 1.0, "td_height_ratio": 1.0,
"td_length_ratio": 0.5, "td_length_ratio": 0.5,
"td_maxheight": 2.0, "td_maxheight": 2.0,
@ -260,7 +258,6 @@
{ {
"td_allow_use_two_tracks": true, "td_allow_use_two_tracks": true,
"td_curve_segcount": 0, "td_curve_segcount": 0,
"td_enabled": false,
"td_height_ratio": 1.0, "td_height_ratio": 1.0,
"td_length_ratio": 0.5, "td_length_ratio": 0.5,
"td_maxheight": 2.0, "td_maxheight": 2.0,
@ -314,7 +311,7 @@
"internal_id": "", "internal_id": "",
"mfg": "", "mfg": "",
"mpn": "", "mpn": "",
"sch_revision": "v1.1" "sch_revision": "v1.0"
}, },
"layer_pairs": [], "layer_pairs": [],
"layer_presets": [], "layer_presets": [],
@ -543,7 +540,6 @@
"pin_to_pin": "warning", "pin_to_pin": "warning",
"power_pin_not_driven": "error", "power_pin_not_driven": "error",
"same_local_global_label": "warning", "same_local_global_label": "warning",
"same_local_global_power": "warning",
"similar_label_and_power": "warning", "similar_label_and_power": "warning",
"similar_labels": "warning", "similar_labels": "warning",
"similar_power": "warning", "similar_power": "warning",
@ -599,8 +595,8 @@
"meta": { "meta": {
"version": 5 "version": 5
}, },
"net_colors": {}, "net_colors": null,
"netclass_assignments": {}, "netclass_assignments": null,
"netclass_patterns": [ "netclass_patterns": [
{ {
"netclass": "Power", "netclass": "Power",
@ -626,7 +622,7 @@
"netlist": "", "netlist": "",
"plot": "", "plot": "",
"specctra_dsn": "", "specctra_dsn": "",
"step": "../housing/c_its-companion-v1.1.step", "step": "../housing/c_its-companion-v1.0.step",
"vrml": "" "vrml": ""
}, },
"page_layout_descr_file": "" "page_layout_descr_file": ""
@ -761,7 +757,7 @@
"uuid": "9ad468b0-d7e4-4d4a-b652-c4a81a952e30" "uuid": "9ad468b0-d7e4-4d4a-b652-c4a81a952e30"
} }
], ],
"used_designators": "#FLG1-3,#PWR1-11,C1,H1-4,J1-2,SW1,TP1-5,U1-2", "used_designators": "H1-4,C1,#PWR1-11,J1-2,SW1,TP1-5,U1-2,#FLG1-3",
"variants": [] "variants": []
}, },
"sheets": [ "sheets": [

View file

@ -6,8 +6,8 @@
(paper "A4" portrait) (paper "A4" portrait)
(title_block (title_block
(title "C-ITS Companion") (title "C-ITS Companion")
(date "2026-11-02") (date "2026-09-06")
(rev "v1.1") (rev "v1.0")
(company "jtbx") (company "jtbx")
) )
(lib_symbols (lib_symbols
@ -4682,8 +4682,7 @@
) )
(symbol (symbol
(lib_id "Connector:Conn_01x02_Socket") (lib_id "Connector:Conn_01x02_Socket")
(at 38.1 165.1 0) (at 38.1 167.64 180)
(mirror y)
(unit 1) (unit 1)
(body_style 1) (body_style 1)
(exclude_from_sim no) (exclude_from_sim no)
@ -4691,9 +4690,10 @@
(on_board yes) (on_board yes)
(in_pos_files yes) (in_pos_files yes)
(dnp no) (dnp no)
(fields_autoplaced yes)
(uuid "892402cc-04d7-4ef7-82b9-1d18ac58ae6e") (uuid "892402cc-04d7-4ef7-82b9-1d18ac58ae6e")
(property "Reference" "J2" (property "Reference" "J2"
(at 38.735 172.72 0) (at 38.735 160.02 0)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
(effects (effects
@ -4703,7 +4703,7 @@
) )
) )
(property "Value" "Battery" (property "Value" "Battery"
(at 38.735 170.18 0) (at 38.735 162.56 0)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
(effects (effects
@ -4712,8 +4712,8 @@
) )
) )
) )
(property "Footprint" "Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal" (property "Footprint" "Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Horizontal"
(at 38.1 165.1 0) (at 38.1 167.64 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
@ -4724,7 +4724,7 @@
) )
) )
(property "Datasheet" "" (property "Datasheet" ""
(at 38.1 165.1 0) (at 38.1 167.64 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
@ -4735,7 +4735,7 @@
) )
) )
(property "Description" "Generic connector, single row, 01x02, script generated" (property "Description" "Generic connector, single row, 01x02, script generated"
(at 38.1 165.1 0) (at 38.1 167.64 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,14 @@
//! C-ITS DENM Evaluation //! C-ITS DENM Evaluation
use c_its_parser::standards::cdd_2_2_1::etsi_its_cdd;
use c_its_parser::standards::denm_2_2_1::denm_pdu_description; use c_its_parser::standards::denm_2_2_1::denm_pdu_description;
use log::info; use log::info;
pub fn handle_denm(etsi: &denm_pdu_description::DENM) { pub fn handle_denm(etsi: &denm_pdu_description::DENM) -> Option<etsi_its_cdd::CauseCodeChoice> {
let mgmt = &etsi.denm.management; let mgmt = &etsi.denm.management;
if mgmt.termination.is_some() { if mgmt.termination.is_some() {
return; return None;
} }
if let (Some(sit), Some(loc)) = (&etsi.denm.situation, &etsi.denm.location) { if let (Some(sit), Some(loc)) = (&etsi.denm.situation, &etsi.denm.location) {
@ -38,7 +39,11 @@ pub fn handle_denm(etsi: &denm_pdu_description::DENM) {
"DENN: {station_id}/{seq_num} CC {cc}/{scc} at {lat_deg:.3}°N, {lon_deg:.3}°E until {end_time:?}" "DENN: {station_id}/{seq_num} CC {cc}/{scc} at {lat_deg:.3}°N, {lon_deg:.3}°E until {end_time:?}"
); );
} }
Some(sit.event_type.cc_and_scc.clone())
} else { } else {
info!("DENM: One of situation or location container not available"); info!("DENM: One of situation or location container not available");
None
} }
} }

View file

@ -401,7 +401,16 @@ async fn main(spawner: Spawner) -> ! {
} }
// update GNSS HB on screen // update GNSS HB on screen
let _ = screen.update_gnss(pvt); #[cfg(feature = "screen")]
{
let _ = screen.update_gnss(pvt);
// revert to waiting for DENMs, if SPAT is not enabled
#[cfg(all(not(feature = "spat"), feature = "denm"))]
let _ = screen
.update(screen::ScreenState::DenmWaiting())
.inspect_err(log_screen_error);
}
} }
ublox::proto27::PacketRef::AckNak(nak) => { ublox::proto27::PacketRef::AckNak(nak) => {
error!("UBX: {nak:?}"); error!("UBX: {nak:?}");
@ -591,7 +600,15 @@ async fn main(spawner: Spawner) -> ! {
transport: _, transport: _,
ref etsi, ref etsi,
} => { } => {
applogic::denm::handle_denm(etsi); match applogic::denm::handle_denm(etsi) {
#[cfg(feature = "screen")]
Some(cc) => {
let _ = screen
.update(screen::ScreenState::DenmWarning(cc))
.inspect_err(log_screen_error);
}
_ => {}
}
// Send data to BLE thread // Send data to BLE thread
#[cfg(feature = "ble")] #[cfg(feature = "ble")]

View file

@ -1,11 +1,16 @@
//! Screen Output //! Screen Output
#[cfg(feature = "denm")]
use c_its_parser::standards::cdd_2_2_1;
use embedded_graphics::prelude::*; use embedded_graphics::prelude::*;
use embedded_graphics::{geometry, mono_font, pixelcolor, primitives, text}; use embedded_graphics::{geometry, mono_font, pixelcolor, primitives, text};
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
use crate::applogic; use crate::applogic;
#[cfg(feature = "denm")]
const DENM_MIN_DISPLAY_TIME: esp_hal::time::Duration = esp_hal::time::Duration::from_secs(3);
pub struct DisplaySize { pub struct DisplaySize {
width: u16, width: u16,
height: u16, height: u16,
@ -24,10 +29,20 @@ where
prev_state: ScreenState, prev_state: ScreenState,
hb_state: bool, hb_state: bool,
gnss_hb_state: bool, gnss_hb_state: bool,
#[cfg(feature = "denm")]
denm_display_start_time: esp_hal::time::Instant,
// assets // assets
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
bike_image: tinytga::Tga<'static, pixelcolor::Rgb565>, bike_image: tinytga::Tga<'static, pixelcolor::Rgb565>, // 45x25px
// #[cfg(feature = "denm")]
// warn_icon: tinytga::Tga<'static, pixelcolor::Rgb565>, // 200x153 px
#[cfg(feature = "denm")]
sv_insert: tinytga::Tga<'static, pixelcolor::Rgb565>, // 80px wide (original 140x70)
#[cfg(feature = "denm")]
ev_insert: tinytga::Tga<'static, pixelcolor::Rgb565>, // 60px wide (original 140x105)
#[cfg(feature = "denm")]
rww_insert: tinytga::Tga<'static, pixelcolor::Rgb565>, // 80px wide (original 140x95)
} }
#[derive(Debug, Default, PartialEq, Eq)] #[derive(Debug, Default, PartialEq, Eq)]
@ -43,6 +58,10 @@ pub enum ScreenState {
GlosaFound(applogic::GlosaFound), GlosaFound(applogic::GlosaFound),
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
GlosaLocked(applogic::GlosaSignalInfo), GlosaLocked(applogic::GlosaSignalInfo),
#[cfg(all(not(feature = "spat"), feature = "denm"))]
DenmWaiting(),
#[cfg(feature = "denm")]
DenmWarning(cdd_2_2_1::etsi_its_cdd::CauseCodeChoice),
} }
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
@ -101,9 +120,23 @@ where
pub fn new(target: D, display_size: DisplaySize) -> Self { pub fn new(target: D, display_size: DisplaySize) -> Self {
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
let data = include_bytes!("../graphics/Sinnbild_Radfahrer_StVO_1992-25px-white.tga"); let bike_image = tinytga::Tga::from_slice(include_bytes!(
#[cfg(feature = "spat")] "../graphics/Sinnbild_Radfahrer_StVO_1992-25px-white.tga"
let bike_image = tinytga::Tga::from_slice(data).expect("Failed to parse TGA image"); ))
.expect("Failed to parse TGA image");
#[cfg(feature = "denm")]
let sv_insert =
tinytga::Tga::from_slice(include_bytes!("../graphics/Stationary_Vehicle-80px.tga"))
.expect("Failed to parse TGA image");
#[cfg(feature = "denm")]
let ev_insert = tinytga::Tga::from_slice(include_bytes!(
"../graphics/Stationary_Emergency_Vehicle-70px.tga"
))
.expect("Failed to parse TGA image");
#[cfg(feature = "denm")]
let rww_insert = tinytga::Tga::from_slice(include_bytes!("../graphics/Work_Zone-80px.tga"))
.expect("Failed to parse TGA image");
Self { Self {
target, target,
@ -111,15 +144,53 @@ where
prev_state: ScreenState::Uninitialized, prev_state: ScreenState::Uninitialized,
hb_state: false, hb_state: false,
gnss_hb_state: false, gnss_hb_state: false,
#[cfg(feature = "denm")]
denm_display_start_time: esp_hal::time::Instant::EPOCH,
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
bike_image, bike_image,
// #[cfg(feature = "denm")]
// warn_icon,
#[cfg(feature = "denm")]
sv_insert,
#[cfg(feature = "denm")]
ev_insert,
#[cfg(feature = "denm")]
rww_insert,
} }
} }
pub fn update(&mut self, state: ScreenState) -> Result<(), D::Error> { pub fn update(&mut self, state: ScreenState) -> Result<(), D::Error> {
#[cfg(feature = "denm")]
let now = esp_hal::time::Instant::now();
#[cfg(feature = "denm")]
// when a DENM was shown before, make sure it's shown for a minimum time
if let ScreenState::DenmWarning(_) = self.prev_state {
use core::ops::Sub;
// update DENM display, if there are updates
if let ScreenState::DenmWarning(cause_code_choice) = &state {
// TODO: find a way to immediately turn off the DENM display when the DENM is over, but keep it for a certain time initially
self.denm_display_start_time = now;
if self.prev_state != state {
self.draw_denm_warning(cause_code_choice)?;
self.prev_state = state;
return Ok(());
}
}
// otherwise early return when timer isn't expired yet
if now.sub(self.denm_display_start_time) < DENM_MIN_DISPLAY_TIME {
return Ok(());
}
}
if self.prev_state != state { if self.prev_state != state {
match &state { match &state {
ScreenState::Uninitialized | ScreenState::Initial => self.draw_slash_screen()?, ScreenState::Uninitialized | ScreenState::Initial => self.draw_slash_screen()?,
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
ScreenState::GlosaSearching(_glosa_searching) => self.draw_glosa_searching()?, ScreenState::GlosaSearching(_glosa_searching) => self.draw_glosa_searching()?,
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
@ -136,10 +207,18 @@ where
self.draw_glosa(glosa_data, prev_glosa_data)?; self.draw_glosa(glosa_data, prev_glosa_data)?;
} }
ScreenState::Error(msg) => self.draw_message(msg)?, ScreenState::Error(msg) => self.draw_message(msg)?,
#[cfg(all(not(feature = "spat"), feature = "denm"))]
ScreenState::DenmWaiting() => self.draw_denm_waiting()?,
#[cfg(feature = "denm")]
ScreenState::DenmWarning(cause_code_choice) => {
self.denm_display_start_time = now;
self.draw_denm_warning(cause_code_choice)?;
}
} }
} }
// Update indicator/ heartbeat // Update indicator/ heartbeat
#[cfg(feature = "spat")]
{ {
let update_ind_dia = 10; let update_ind_dia = 10;
let circle_x_pos = let circle_x_pos =
@ -477,6 +556,92 @@ where
Ok(()) Ok(())
} }
#[cfg(all(not(feature = "spat"), feature = "denm"))]
fn draw_denm_waiting(&mut self) -> Result<(), D::Error> {
// clear whole display and draw text
self.clear()?;
text::Text::with_alignment(
"Waiting\nfor DENM...",
geometry::Point::new(i32::from(self.size.width) / 2, 130 + self.size.offset_top),
Self::DEFAULT_TEXT_STYLE,
text::Alignment::Center,
)
.draw(&mut self.target)?;
Ok(())
}
#[cfg(feature = "denm")]
pub fn draw_denm_warning(
&mut self,
cc: &cdd_2_2_1::etsi_its_cdd::CauseCodeChoice,
) -> Result<(), D::Error> {
// clear whole display and draw image
self.clear()?;
let centerline = i32::from(self.size.width) / 2;
let sign_top = self.size.offset_top + 40;
// build triangle shape
{
let point1 = geometry::Point::new(centerline, sign_top);
let point2 = geometry::Point::new(centerline - 100, sign_top + 150);
let point3 = geometry::Point::new(centerline + 100, sign_top + 150);
let mut line_style =
primitives::PrimitiveStyle::with_stroke(pixelcolor::Rgb565::CSS_RED, 10);
line_style.fill_color = Some(pixelcolor::Rgb565::WHITE);
primitives::Triangle::new(point1, point2, point3)
.into_styled(line_style)
.draw(&mut self.target)?;
}
// add icon inside the triangle
match cc {
cdd_2_2_1::etsi_its_cdd::CauseCodeChoice::slowVehicle26(_)
| cdd_2_2_1::etsi_its_cdd::CauseCodeChoice::stationaryVehicle94(_) => {
embedded_graphics::image::Image::new(
&self.sv_insert,
geometry::Point::new(centerline - (80 / 2), sign_top + 90),
)
.draw(&mut self.target)?;
}
cdd_2_2_1::etsi_its_cdd::CauseCodeChoice::rescueAndRecoveryWorkInProgress15(_)
| cdd_2_2_1::etsi_its_cdd::CauseCodeChoice::emergencyVehicleApproaching95(_) => {
embedded_graphics::image::Image::new(
&self.ev_insert,
geometry::Point::new(centerline - (70 / 2), sign_top + 85),
)
.draw(&mut self.target)?;
}
cdd_2_2_1::etsi_its_cdd::CauseCodeChoice::roadworks3(_) => {
embedded_graphics::image::Image::new(
&self.rww_insert,
geometry::Point::new(centerline - (80 / 2), sign_top + 85),
)
.draw(&mut self.target)?;
}
_ => {}
}
let (cc, scc) = cc.to_u8_tuple();
text::Text::with_alignment(
&alloc::format!("DENM CC {cc}/{scc}"),
geometry::Point::new(
i32::from(self.size.width) / 2,
sign_top + 150 + (10 / 2) + 30,
),
Self::MID_TEXT_STYLE,
text::Alignment::Center,
)
.draw(&mut self.target)?;
Ok(())
}
#[allow(unused)] #[allow(unused)]
fn draw_slash_screen(&mut self) -> Result<(), D::Error> { fn draw_slash_screen(&mut self) -> Result<(), D::Error> {
self.clear_all()?; self.clear_all()?;