WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Flit for newer XO Laptops (Linux kernel 3.3)  (Read 2496 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Flit for newer XO Laptops (Linux kernel 3.3)
« on: June 03, 2013, 04:47:38 PM »
::DELURKING::   Hi TC people.  Flit 1.3.1 was released to the repository back in July of 2011, using source essentially the same as the beta 1.3.0 code I posted to this topic (http://forum.tinycorelinux.net/index.php/topic,8065.msg43350.html#msg43350) with trivial version number changes.

A Flit user has kindly sent me a small patch that should make Flit power monitoring work properly with newer XO laptops using the Linux 3.3 kernel series.    I want to find out if this patch will be acceptable to other users of Flit on XO computers.  (Maybe not so many users of TC and Flit on XO?   :o)  SO, if you have a stake in using Flit on XO, does this patch look like it will work for you?  If not, is it because you plan to stay on an old release of the Linux on XO? 

If there are no protests, I will plan to release a minor update to Flit with this patch within the next few weeks.  Maybe later this summer I can get back to doing a some more FLTK stuff on TC again.  ;)

Thanks!

Patch content:
Code: [Select]
--- a/flit.cpp 2010-12-11 20:11:47.000000000 +0200
+++ b/flit.cpp 2013-06-02 22:01:14.000000000 +0300
@@ -275,10 +275,10 @@
 enum {BATT_SYSTEM_ACPI, BATT_SYSTEM_OLPC};
 int BatterySystemType = BATT_SYSTEM_ACPI;
 
-#define OLPC_BATT_CAP_DEVFILE   "/sys/devices/platform/olpc-battery.0/power_supply/olpc-battery/capacity"
+#define OLPC_BATT_CAP_DEVFILE   "/sys/class/power_supply/olpc-battery/capacity"
 //#define OLPC_BATT_CAP_DEVFILE   "/home/tc/projects/flit/capacity"
 
-#define OLPC_BATT_AC_DEVFILE   "/sys/devices/platform/olpc-battery.0/power_supply/olpc-ac/online"
+#define OLPC_BATT_AC_DEVFILE   "/sys/devices/0.battery/power_supply/olpc-ac/online"
 //#define OLPC_BATT_AC_DEVFILE   "/home/tc/projects/flit/online"
 #endif

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Flit for newer XO Laptops (Linux kernel 3.3)
« Reply #1 on: June 03, 2013, 09:31:01 PM »
cool thanks

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Flit for newer XO Laptops (Linux kernel 3.3)
« Reply #2 on: June 11, 2013, 07:00:38 AM »
It would be good if you could recompile flit for tc-5.x (updated libpng)  :)