7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-08 06:25:30 +00:00

Remove testconf

This commit is contained in:
Ratan Varghese 2021-03-21 22:58:38 -04:00
parent eb50447a9a
commit 7f7c28737f
2 changed files with 0 additions and 96 deletions
Software/waveview/src

View File

@ -4,7 +4,6 @@ import Graph from './components/graph/graph';
import BottomBar from './components/bottombar/bottombar';
import Sidebar from './components/sidebar/sidebar';
import TestPoints from './util/testpoints';
import TestConf from './util/testconf';
interface IAppState {
tickCount: number;
@ -16,13 +15,11 @@ class App extends React.Component {
state: IAppState;
timerID: number = 0;
generator: TestPoints;
conf: TestConf;
constructor(props: any) {
super(props);
this.state = initialState;
this.generator = new TestPoints(50, 50);
this.conf = new TestConf();
}
componentDidMount() {
@ -42,8 +39,6 @@ class App extends React.Component {
this.generator.update();
if(tickCount % 100 === 0) {
console.log(tickCount);
this.conf.update(tickCount % 500 !== 0);
//this.conf.mathUpdate();
}
this.setState({tickCount: tickCount});
}

View File

@ -1,91 +0,0 @@
import { CMD, PlumberArgs, Plumber } from './plumber';
class TestConf {
getEdgeArgs: PlumberArgs;
setEdgeArgs: PlumberArgs;
getWinArgs: PlumberArgs;
setWinArgs: PlumberArgs;
getMinArgs: PlumberArgs;
getMaxArgs: PlumberArgs;
constructor() {
this.getEdgeArgs = {
headCheck: (a, head) => true,
bodyCheck: (a, bytesRead, body) => {
console.log("C++ edge type: " + body[0]);
return true;
},
cmd: CMD.CMD_GetEdgeType,
id: 0,
writeData: [0, 0]
}
this.setEdgeArgs = {
headCheck: () => true,
bodyCheck: () => true,
cmd: CMD.CMD_SetEdgeType,
id: 0,
writeData: [2, 0]
}
this.getWinArgs = {
headCheck: () => true,
bodyCheck: (args, bytesRead, body) => {
var body32 = new Uint32Array(body.buffer);
console.log(body32);
return true;
},
cmd: CMD.CMD_GetWindowSize,
id: 0,
writeData: [0, 0]
}
this.setWinArgs = {
headCheck: () => {
console.log("I set win");
return true;
},
bodyCheck: () => true,
cmd: CMD.CMD_SetWindowSize,
id: 0,
writeData: new Int8Array((new Uint32Array([20])).buffer)
}
this.getMinArgs = {
headCheck: () => true,
bodyCheck: (args, bytesRead, body) => {
console.log(Plumber.getInstance().decodeGetMinMax(args, body));
return true;
},
cmd: CMD.CMD_GetMin,
id: 0,
writeData: [1, 0, 1, 1]
}
this.getMaxArgs = {
headCheck: () => true,
bodyCheck: (args, bytesRead, body) => {
console.log(Plumber.getInstance().decodeGetMinMax(args, body));
return true;
},
cmd: CMD.CMD_GetMax,
id: 0,
writeData: [1, 1, 1, 1]
}
}
update(get: boolean) {
/*if(get) {
Plumber.getInstance().cycle(this.getWinArgs);
}
else {
Plumber.getInstance().cycle(this.setWinArgs);
}*/
//Plumber.getInstance().cycle(this.getMinArgs);
}
}
export default TestConf;