Skip to content

Commit

Permalink
merge dnegrych work + select sdr card on staertup + fast relative mod…
Browse files Browse the repository at this point in the history
…e init
  • Loading branch information
pavels committed Mar 26, 2018
1 parent 1719099 commit e5f36d7
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 189 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ Contributing
* Start a feature/bugfix branch.
* Commit and push until you are happy with your contribution.

Contributors
-----
* [dnegrych](https://github.com/dnegrych)

Copyright
-----

Expand Down
27 changes: 8 additions & 19 deletions graph.pde
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
int graphWidth() {

return width - 255;
}

int graphX() {


return 230;
}

int graphHeight() {


return height - 50;
}

int graphY() {


return 25;
}

int hzPerPixel() {
return (stopFreq - startFreq)/graphWidth();
return (stopFreq - startFreq)/graphWidth();
}

void graphDrawLine(int x1, int y1, int x2, int y2, int lineColor, float alpha) {
// this rtn draws the frequency trace on the screen ===========
// this rtn draws the frequency trace on the screen ===========
stroke(lineColor, alpha);
if (drawSampleToggle) {
ellipse(x2 + graphX(), graphHeight() - y2 + graphY(),1,1);
Expand All @@ -37,7 +30,7 @@ void graphDrawLine(int x1, int y1, int x2, int y2, int lineColor, float alpha) {
}

void drawGraphMatt(double minValue, double maxValue, int minFreq, int maxFreq) {
// This rtn draws the grid on the screen ======================
// This rtn draws the grid on the screen ======================
int pixelSpacing = 50;

int verticals = (graphWidth() / pixelSpacing / 5) * 5;
Expand All @@ -55,7 +48,6 @@ void drawGraphMatt(double minValue, double maxValue, int minFreq, int maxFreq) {
double yStep = (maxValue - minValue) / horizontals;
double yPos = maxValue;

// stroke(#A7A7A7);
stroke(#A7A7A7);
fill(#A7A7A7);

Expand All @@ -75,13 +67,10 @@ void drawGraphMatt(double minValue, double maxValue, int minFreq, int maxFreq) {

}

void sweep(int x1, int x2, int lineColor, float alpha) {
// show sweep
void sweep(int x, int lineColor, float alpha) {
// show sweep

// erase last marker
stroke(#000000, alpha);
line(x1 + graphX(), graphY()+10 ,x1 + graphX(), graphY()+graphHeight());
// plot new marker
stroke(lineColor, alpha);
line(x2 + graphX(), graphY()+10 ,x2 + graphX(), graphY()+graphHeight());
// plot new marker
stroke(lineColor, alpha);
line(x + graphX(), graphY() ,x + graphX(), graphY()+graphHeight());
}
Loading

0 comments on commit e5f36d7

Please sign in to comment.