[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 01/29: Addition of debug code

noreply at xfce.org noreply at xfce.org
Mon Dec 18 12:45:32 CET 2017


This is an automated email from the git hooks/post-receive script.

o   m   e   g   a   p   h   i   l       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-hardware-monitor-plugin.

commit 81ce4de7dc2873538e040490d16e5de5b2425732
Author: OmegaPhil <OmegaPhil at startmail.com>
Date:   Fri Nov 17 20:03:44 2017 +0000

    Addition of debug code
---
 src/curve-view.cpp    | 14 ++++++++++++++
 src/value-history.cpp |  8 ++++++++
 2 files changed, 22 insertions(+)

diff --git a/src/curve-view.cpp b/src/curve-view.cpp
index e3e12db..4afa4a5 100644
--- a/src/curve-view.cpp
+++ b/src/curve-view.cpp
@@ -70,9 +70,17 @@ void Curve::update(unsigned int max_samples)
 void Curve::draw(Gnome::Canvas::Canvas &canvas, int width, int height,
   double max)
 {
+  // Debug code
+  /*std::cout << "Curve::draw: Called, remaining_draws: " << remaining_draws
+            << " (" << monitor->get_short_name() << ")\n";*/
+
   if (remaining_draws <= 0)
     return;
 
+  // Debug code
+  /*std::cout << "Curve::draw: remaining_draws passed (monitor "
+            << monitor->get_short_name() << ")\n";*/
+
   --remaining_draws;
   
   double time_offset = double(remaining_draws) / CanvasView::draw_iterations;
@@ -120,6 +128,12 @@ void Curve::draw(Gnome::Canvas::Canvas &canvas, int width, int height,
       y = 0;
 
     points.push_back(Gnome::Art::Point(x, y));
+
+    // Debug code
+    /*std::cout << "x: " << x << ", y: " << y << ", width of canvas: " << width
+              << ", time offset: " << time_offset << " (monitor "
+              << monitor->get_short_name() << "\n";*/
+
     x -= CurveView::pixels_per_sample;
   } while (++vi != vend);
 
diff --git a/src/value-history.cpp b/src/value-history.cpp
index ecb08e6..ca02450 100644
--- a/src/value-history.cpp
+++ b/src/value-history.cpp
@@ -41,11 +41,19 @@ double ValueHistory::get_max_value()
 void ValueHistory::update(unsigned int max_samples, bool &new_value)
 {
   --waits_remaining;
+
+  // Debug code
+  /*std::cout << "ValueHistory::update: Called (monitor "
+            << monitor->get_short_name() << ")\n";*/
     
   if (waits_remaining <= 0) {
     new_value = true;
     monitor->measure();
 
+    // Debug code
+    /*std::cout << "ValueHistory::update: Measurement made (monitor "
+              << monitor->get_short_name() << ")\n";*/
+
     // Fetching new measurement
     double measurement = monitor->value();
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list