Skip to content

Commit

Permalink
Added GUI for setting ac/dc limits
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardclifford committed Apr 28, 2023
1 parent 398e86f commit 024bf29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fsae-dashboard",
"version": "1.0.1",
"version": "1.0.2",
"private": true,
"author": {
"name": "Ted Clifford",
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/Components/ConfigPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ const ConfigPane = forwardRef(({visible, sock, setShowConf, darkMode, setDarkMod

<div className="option-page">
<div className="option-select">
{/* <div className="panel button" style={{filter: showACLim ? "brightness(.7)" : ""}} onClick={(e) => togglePane(e, setShowACLim, showACLim)}> */}
<div className="panel button" style={{filter: "brightness(.5)"}}>
<div className="panel button" style={{filter: showACLim ? "brightness(.7)" : ""}} onClick={(e) => togglePane(e, setShowACLim, showACLim)}>
{/* <div className="panel button" style={{filter: "brightness(.5)"}}> */}
Set AC Current Limit
</div>

{/* <div className="panel button" style={{filter: showDCLim ? "brightness(.7)" : ""}} onClick={(e) => togglePane(e, setShowDCLim, showDCLim)}> */}
<div className="panel button" style={{filter: "brightness(.5)"}}>
<div className="panel button" style={{filter: showDCLim ? "brightness(.7)" : ""}} onClick={(e) => togglePane(e, setShowDCLim, showDCLim)}>
{/* <div className="panel button" style={{filter: "brightness(.5)"}}> */}
Set DC Current Limit
</div>

Expand All @@ -309,9 +309,9 @@ const ConfigPane = forwardRef(({visible, sock, setShowConf, darkMode, setDarkMod
</div>
</div>

<NumberPad fn={(val) => alert(val)} show={showACLim} setShow={setShowACLim} name="Set AC Max"/>
<NumberPad fn={(val) => alert(val)} show={showDCLim} setShow={setShowDCLim} name="Set DC Max"/>
<NumberPad fn={(val) => {sock.send(JSON.stringify({opt: "SET_TCS", strength: val}));}} show={showTCS} setShow={setShowTCS} name="Set TCS Strength (%)"/>
<NumberPad fn={(val) => {sock.send(JSON.stringify({opt: "SET_AC_LIM", ac_limit: val}));}} show={showACLim} setShow={setShowACLim} name="Set AC Max (A)"/>
<NumberPad fn={(val) => {sock.send(JSON.stringify({opt: "SET_DC_LIM", dc_limit: val}));}} show={showDCLim} setShow={setShowDCLim} name="Set DC Max (A)"/>
<NumberPad fn={(val) => {sock.send(JSON.stringify({opt: "SET_TCS", strength: val}));}} show={showTCS} setShow={setShowTCS} name="Set TCS Strength (%, 0 to disable)"/>
<NumberPad fn={(val) => alert(val)} show={showRegen} setShow={setShowRegen} name="Set Regen Strength (%)"/>

<div className="option-pane" id="" style={{display: showDCLim ? "" : "none"}}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Components/VehicleStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const VehicleStatus = forwardRef(({ip, setShowConf}, ref) =>{
</span>

<span className="label" id="version">
{ip} v1.0.1
{ip} v1.0.2
</span>
</p>
</div>
Expand Down

0 comments on commit 024bf29

Please sign in to comment.