Skip to content

Commit

Permalink
led8t8
Browse files Browse the repository at this point in the history
  • Loading branch information
joggyGeorge committed May 5, 2021
1 parent c7babbe commit 70644e3
Show file tree
Hide file tree
Showing 9 changed files with 812 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { SevenSegmentLED } from "./SevenSegmentLED/SevenSegmentLED";
import { SevenSegmentLEDCore } from "./SevenSegmentLED/SevenSegmentLEDCore";
import { LEDMatrix4t4 } from "./LEDMatrix4t4/LEDMatrix4t4";
import { LEDMatrix4t4Core } from "./LEDMatrix4t4/LEDMatrix4t4Core";
import { LEDMatrix8t8 } from "./LEDMatrix8t8/LEDMatrix8t8";
import { LEDMatrix8t8Core } from "./LEDMatrix8t8/LEDMatrix8t8Core";

export const deviceMap = new Map([
['LED', [LED, LEDCore]],
['LEDMatrix8t8', [LEDMatrix8t8, LEDMatrix8t8Core]],
['HButton', [HButton, HButtonCore]],
['SevenSegmentLED', [SevenSegmentLED, SevenSegmentLEDCore]],
['LEDMatrix4t4', [LEDMatrix4t4, LEDMatrix4t4Core]]

])

export class Devices {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.LEDMatrix {
.LEDMatrix4t4 {
display: inline-block;
height: 80px;
}

.LEDMatrix #panel {
.LEDMatrix4t4 #panel {
height: 92px;
width: 92px;
background-color: #43506C;
Expand All @@ -13,7 +13,7 @@
border-radius: 4px;
}

.LEDMatrix span {
.LEDMatrix4t4 span {
width: 16px;
height: 16px;
background: #3D6198;
Expand All @@ -23,83 +23,83 @@
vertical-align: middle;
}

.LEDMatrix #dot0_0 {
.LEDMatrix4t4 #dot0_0 {
margin-top: 0px;
margin-left: -40px;
}

.LEDMatrix #dot0_1 {
.LEDMatrix4t4 #dot0_1 {
margin-top: 0px;
margin-left: -20px;
}

.LEDMatrix #dot0_2 {
.LEDMatrix4t4 #dot0_2 {
margin-top: 0px;
margin-left: 0px;
}

.LEDMatrix #dot0_3 {
.LEDMatrix4t4 #dot0_3 {
margin-top: 0px;
margin-left: 20px;
}


.LEDMatrix #dot1_0 {
.LEDMatrix4t4 #dot1_0 {
margin-top: 20px;
margin-left: -40px;
}

.LEDMatrix #dot1_1 {
.LEDMatrix4t4 #dot1_1 {
margin-top: 20px;
margin-left: -20px;
}

.LEDMatrix #dot1_2 {
.LEDMatrix4t4 #dot1_2 {
margin-top: 20px;
margin-left: 0px;
}

.LEDMatrix #dot1_3 {
.LEDMatrix4t4 #dot1_3 {
margin-top: 20px;
margin-left: 20px;
}

.LEDMatrix #dot2_0 {
.LEDMatrix4t4 #dot2_0 {
margin-top: 40px;
margin-left: -40px;
}

.LEDMatrix #dot2_1 {
.LEDMatrix4t4 #dot2_1 {
margin-top: 40px;
margin-left: -20px;
}

.LEDMatrix #dot2_2 {
.LEDMatrix4t4 #dot2_2 {
margin-top: 40px;
margin-left: 0px;
}

.LEDMatrix #dot2_3 {
.LEDMatrix4t4 #dot2_3 {
margin-top: 40px;
margin-left: 20px;
}

.LEDMatrix #dot3_0 {
.LEDMatrix4t4 #dot3_0 {
margin-top: 60px;
margin-left: -40px;
}

.LEDMatrix #dot3_1 {
.LEDMatrix4t4 #dot3_1 {
margin-top: 60px;
margin-left: -20px;
}

.LEDMatrix #dot3_2 {
.LEDMatrix4t4 #dot3_2 {
margin-top: 60px;
margin-left: 0px;
}

.LEDMatrix #dot3_3 {
.LEDMatrix4t4 #dot3_3 {
margin-top: 60px;
margin-left: 20px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class LEDMatrix4t4 extends Component {
const ele = row_sel[r];
if(ele === 1) {
let new_row = col_sel.map(val => val === 1 ? true : false)
let old_row = that.state.onOff[r]
//let old_row = that.state.onOff[r]
l_onOff[r] = new_row
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class LEDMatrix4t4Core extends Component {

render() {
return (
<div className="LEDMatrix">
<div className="LEDMatrix4t4">
<div id="panel"></div>
<span id="dot0_0" className={this.props.onOff[0][0] ? "on" : ""} />
<span id="dot0_1" className={this.props.onOff[0][1] ? "on" : ""} />
Expand Down
Loading

0 comments on commit 70644e3

Please sign in to comment.