aboutsummaryrefslogtreecommitdiffstats
path: root/pointcloud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pointcloud.cpp')
-rw-r--r--pointcloud.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/pointcloud.cpp b/pointcloud.cpp
index 417c31c..7c92d16 100644
--- a/pointcloud.cpp
+++ b/pointcloud.cpp
@@ -96,9 +96,10 @@ void PointCloud::push_samples(std::pair<std::vector<complexf>, std::vector<compl
double arg_tx = std::arg(tx[i]);
// Phase is colour
- p.r = p.g = p.b = 255;
+ p.r = p.b = 255;
+ p.g = 64;
if (arg_rx > arg_tx) {
- int corr = 255 - 10 * (arg_rx - arg_tx);
+ int corr = 255 - 20 * (arg_rx - arg_tx);
if (corr < 0) {
corr = 0;
@@ -107,7 +108,7 @@ void PointCloud::push_samples(std::pair<std::vector<complexf>, std::vector<compl
p.r = corr;
}
else {
- int corr = 255 - 10 * (arg_tx - arg_rx);
+ int corr = 255 - 20 * (arg_tx - arg_rx);
if (corr < 0) {
corr = 0;
@@ -124,7 +125,7 @@ void PointCloud::push_samples(std::pair<std::vector<complexf>, std::vector<compl
}
}
-void PointCloud::handle_event()
+std::string PointCloud::handle_event()
{
SDL_Event event;
while (SDL_PollEvent(&event))
@@ -133,8 +134,14 @@ void PointCloud::handle_event()
case SDL_QUIT:
throw sdl_quit();
break;
+ case SDL_KEYDOWN:
+ std::string key(SDL_GetKeyName(event.key.keysym.sym));
+ return key;
+ break;
}
}
+
+ return std::string();
}
void PointCloud::draw()