diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-05-10 10:26:44 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-05-10 10:27:07 +0200 |
commit | cc7b71816bb5cf379cff8e46c691cc5965ba3b82 (patch) | |
tree | 7adf97f22095cb070e903a2ba4cd28c64cee52bf | |
parent | 94da3281b5e2767699db0de76816f836a6770943 (diff) | |
download | glutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.tar.gz glutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.tar.bz2 glutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.zip |
Fix tone LED in code and schematics
-rw-r--r-- | doc/fax_1750_interconnect.svg | 75 | ||||
-rw-r--r-- | doc/schematic.svg | 46 | ||||
-rw-r--r-- | src/common/src/Core/main.c | 8 | ||||
-rw-r--r-- | src/glutt-o-logique/pio.c | 4 |
4 files changed, 70 insertions, 63 deletions
diff --git a/doc/fax_1750_interconnect.svg b/doc/fax_1750_interconnect.svg index b815589..24f7d62 100644 --- a/doc/fax_1750_interconnect.svg +++ b/doc/fax_1750_interconnect.svg @@ -2264,9 +2264,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="8.0000002" - inkscape:cx="486.75298" - inkscape:cy="600.68309" + inkscape:zoom="4.0000001" + inkscape:cx="578.06182" + inkscape:cy="593.07626" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="true" @@ -9729,7 +9729,7 @@ <path sodipodi:nodetypes="cccc" style="opacity:1;fill:none;fill-opacity:1;stroke:#1b0073;stroke-width:1.41732287;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="m 581.10239,485.43305 v 14.17322 h 14.17323 v -14.17323" + d="m 581.10239,485.43305 v 28.34645 m 14.17323,0 0,-28.34646" id="path4214" inkscape:connector-curvature="0" /> <g @@ -12222,6 +12222,51 @@ x="470.55121" y="865.27557" style="font-size:7.5px;line-height:1.25;font-family:sans-serif;stroke-width:1px">s'allume quand connecté à GND</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="561.41235" + y="529.33142" + id="text8519-3-2-5"><tspan + sodipodi:role="line" + id="tspan8521-6-7-6" + x="561.41235" + y="529.33142" + style="font-size:7.5px;line-height:1.25;font-family:sans-serif;stroke-width:1px">10k</tspan></text> + <path + id="path4172" + style="display:inline;fill:none;fill-rule:evenodd;stroke:#ff6900;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 566.92916,513.7795 h -14.17323 l 10e-6,59.52756 -184.25199,0" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + <g + id="g1562" + transform="rotate(90,680.31498,726.37793)" + style="display:inline"> + <path + inkscape:connector-curvature="0" + id="path1554" + style="fill:#174568;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 467.71654,808.50563 c -1.60373,0 -2.91168,1.30966 -2.91168,2.91168 0,1.60374 1.30795,2.91169 2.91168,2.91169 1.60203,0 2.91169,-1.31479 2.91169,-2.91169 0,-1.60202 -1.30966,-2.91168 -2.91169,-2.91168" /> + <ellipse + ry="8.5039177" + rx="8.5039444" + cy="811.4173" + cx="467.71655" + id="ellipse1556" + style="opacity:1;fill:none;fill-opacity:1;stroke:#00001c;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + d="m 467.71654,822.67886 c -1.60373,0 -2.91168,1.30966 -2.91168,2.91168 0,1.60374 1.30795,2.91169 2.91168,2.91169 1.60203,0 2.91169,-1.31479 2.91169,-2.91169 0,-1.60202 -1.30966,-2.91168 -2.91169,-2.91168" + style="fill:#174568;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path1558" + inkscape:connector-curvature="0" /> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path1560" + d="m 467.71655,825.59054 c -1.44203,-4.4297 -1.51518,-9.08849 0,-14.17322" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" /> + </g> <g style="display:inline" transform="rotate(180,517.32285,662.59841)" @@ -12251,21 +12296,15 @@ sodipodi:nodetypes="cc" /> </g> <text - xml:space="preserve" - style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - x="561.41235" + id="text1566" y="529.33142" - id="text8519-3-2-5"><tspan - sodipodi:role="line" - id="tspan8521-6-7-6" - x="561.41235" + x="588.34143" + style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="font-size:7.5px;line-height:1.25;font-family:sans-serif;stroke-width:1px" y="529.33142" - style="font-size:7.5px;line-height:1.25;font-family:sans-serif;stroke-width:1px">10k</tspan></text> - <path - id="path4172" - style="display:inline;fill:none;fill-rule:evenodd;stroke:#ff6900;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 566.92916,513.7795 h -14.17323 l 10e-6,59.52756 -184.25199,0" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccc" /> + x="588.34143" + id="tspan1564" + sodipodi:role="line">4k7</tspan></text> </g> </svg> diff --git a/doc/schematic.svg b/doc/schematic.svg index af32ecf..01d75ca 100644 --- a/doc/schematic.svg +++ b/doc/schematic.svg @@ -196,9 +196,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.2508214" - inkscape:cx="529.42295" - inkscape:cy="440.94725" + inkscape:zoom="2.5016428" + inkscape:cx="764.10391" + inkscape:cy="449.8461" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -234,7 +234,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -7825,10 +7825,10 @@ <path sodipodi:nodetypes="cc" style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" - d="m 950,457.3622 h 56" + d="m 925,457.36223 81,-3e-5" id="path10598" inkscape:path-effect="#path-effect36408-1-1" - inkscape:original-d="m 950,457.3622 h 56" + inkscape:original-d="m 925,457.36223 81,-3e-5" inkscape:connector-curvature="0" /> <text xml:space="preserve" @@ -7842,40 +7842,6 @@ y="455.9155" style="font-weight:bold;font-size:10px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'Sans Bold'">DET 1750</tspan></text> </g> - <g - id="g10616" - transform="matrix(0.75,0,0,0.75,644.27746,19.340556)"> - <rect - style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect10606" - width="5.99998" - height="13" - x="-880.36218" - y="281" - transform="rotate(-90)" /> - <path - style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 275,877.3622 h 5.97933" - id="path10608" - inkscape:connector-curvature="0" /> - <path - sodipodi:nodetypes="cc" - style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 301,877.3622 h -6.97934" - id="path10610" - inkscape:connector-curvature="0" /> - <text - xml:space="preserve" - style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none" - x="287.63007" - y="890.64972" - id="text10614"><tspan - sodipodi:role="line" - x="287.63007" - y="890.64972" - style="font-weight:bold;font-size:9px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'Sans Bold';text-align:center;text-anchor:middle" - id="tspan10612">3k3</tspan></text> - </g> <path style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 716.0646,603.61222 7.5,3.75 -7.5,3.75 z" diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index f1cf0e7..fc04536 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -579,16 +579,18 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) } + const int current_tone_1750_status = tone_1750_status(); #ifdef SIMULATOR - gui_in_tone_1750 = + gui_in_tone_1750 = current_tone_1750_status; #endif - fsm_input.det_1750 = tone_1750_status(); + fsm_input.det_1750 = current_tone_1750_status; + pio_set_det_1750(current_tone_1750_status); + fsm_input.long_1750 = tone_1750_for_5_seconds(); // TODO implement a DTMF controlled state machine for setting SQ2 pio_set_sq2(0); - pio_set_det_1750(fsm_input.det_1750); fsm_input.fax_mode = tone_fax_status(); fsm_input.swr_high = swr_error_flag; fsm_input.hour_is_even = hour_is_even; diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c index 5e5baf2..08a5905 100644 --- a/src/glutt-o-logique/pio.c +++ b/src/glutt-o-logique/pio.c @@ -329,10 +329,10 @@ void pio_set_fax(int on) void pio_set_det_1750(int on) { if (on) { - GPIO_ResetBits(GPIOA, GPIOA_PIN_DET_1750); + GPIO_SetBits(GPIOA, GPIOA_PIN_DET_1750); } else { - GPIO_SetBits(GPIOA, GPIOA_PIN_DET_1750); + GPIO_ResetBits(GPIOA, GPIOA_PIN_DET_1750); } } |