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

Merge pull request from EEVengers/electron-pipe

Exact division count
This commit is contained in:
ratanvarghese 2021-03-25 09:19:12 -04:00 committed by GitHub
commit 2d61a0c327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions
Software/waveview/src
components/graph
configuration

View File

@ -45,6 +45,20 @@ class Graph extends React.Component<any, any> {
let base = this.props.horizontalWidget.horizontalTimeBase.course;
let dCount = DefaultValues.divisions.time;
let winSize = dCount * convertTime(base.value, base.unit, TimeUnit.NanoSecond);
let yTicks = [-128, -96, -64, -32, 0, 32, 64, 96, 128]
let xTicks = [
0,
1*winSize/10,
2*winSize/10,
3*winSize/10,
4*winSize/10,
5*winSize/10,
6*winSize/10,
7*winSize/10,
8*winSize/10,
9*winSize/10,
winSize
]
return (
<div className="graph_view">
<div
@ -67,7 +81,7 @@ class Graph extends React.Component<any, any> {
top={0}
width={10000}
height={10000}
tickTotal={12}
tickValues={yTicks}
/>
<VerticalGridLines
style={{stroke: '#4D4D4D'}}
@ -75,7 +89,7 @@ class Graph extends React.Component<any, any> {
top={0}
width={10000}
height={10000}
tickTotal={10}
tickValues={xTicks}
/>
<XAxis
title=""

View File

@ -244,7 +244,7 @@ const horizontalTimeBases = [
// Start at horizontalTimeBases[15] and change accordingly
let divisions = {
voltage: 10, //TODO: change graph to 8, make this 8
voltage: 8,
time: 10
}