Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rinon13 committed Mar 14, 2023
1 parent 419b351 commit e9eb678
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions ArduinoFrontend/src/app/Libs/inputs/Potentiometer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Potentiometer extends CircuitElement {
*/
visitedLEDs = new Set();
/**
* Stores connected LEDs
* Stores connected LEDs
*/
connectedLEDs: LED[] = [];
/**
Expand Down Expand Up @@ -221,8 +221,7 @@ export class Potentiometer extends CircuitElement {
initSimulation(): void {

if (!this.areNodesConnectedProperly()) {
console.log("Nodes not connected properly");
window.showToast("Potentiometer not connected properly.");
window.showToast('Potentiometer not connected properly.');
return;
}
const attr = this.elements[1].attr();
Expand Down Expand Up @@ -336,8 +335,7 @@ export class Potentiometer extends CircuitElement {
if (this.nodes[0].isConnected() && this.nodes[1].isConnected()) {
this.isRheostat = true;
return true;
}
else if (this.nodes[1].isConnected() && this.nodes[2].isConnected()) {
} else if (this.nodes[1].isConnected() && this.nodes[2].isConnected()) {
this.isRheostat = true;
return true;
}
Expand Down Expand Up @@ -492,10 +490,11 @@ export class Potentiometer extends CircuitElement {
}
}
}

/**
* Return the node which is connected to arduino by recursively finding LEDs inside the circuit
* @param node The Node which need to be checked
*/
* Return the node which is connected to arduino by recursively finding LEDs inside the circuit
* @param node The Node which need to be checked
*/
getRecLED(node: Point, startedOn: string) {
try {
if (node.connectedTo.start.parent.keyName === 'LED') {
Expand Down
4 changes: 2 additions & 2 deletions ArduinoFrontend/src/app/Libs/outputs/Led.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class LED extends CircuitElement {
/**
* Stores variable resistance from Potentiometer
*/
variableResistance: number = 0;
variableResistance = 0;
/**
* LED constructor
* @param canvas Raphael Canvas (Paper)
Expand Down Expand Up @@ -308,7 +308,7 @@ export class LED extends CircuitElement {
this.pwmAttached = false;
this.voltage = 0;
this.resistance = LED.internalResistance;
this.visitedResistors.clear();
this.visitedResistors.clear();
this.variableResistance = 0;
}
/**
Expand Down

0 comments on commit e9eb678

Please sign in to comment.