Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-11-2015, 06:29 AM   #76
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Since things in /var/local/* can be cleared when user fat-fingers "Reset to defaults" (at least I think that is correct, its way early in the morning as I write this) - - -

Shouldn't the upstart script in /etc/init have strict presence checking for things in /var/local ?

(Unless "Reset to defaults" also re-initializes /etc/init/* - I don't know if it does or does not.)
knc1 is offline   Reply With Quote
Old 06-11-2015, 11:06 AM   #77
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
Awesome work!
brianinmaine is offline   Reply With Quote
Advert
Old 06-16-2015, 01:41 PM   #78
nick-tech
Enthusiast
nick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned off
 
Posts: 46
Karma: 97694
Join Date: Feb 2012
Device: kindle touch
Hello!

Thanks eureka for your great work, that's exactly what I wanted!

I have a kindle Touch running FW 5.1.2 (as this is the last one that supports enabling TTS via JBPatch for all books)

But with this firmware the Current is displayed over the battery symbol (that somehow misses the white border??) I attached an example

I tried to play around with _batteryCurrentEl.style.paddingRight = "3pt"; in battery_current_indicator.sh that shifted the text somewhere, but not where I wanted it to be..

How can I move it to the left (or chage the colour to some sort of grey)?
Attached Thumbnails
Click image for larger version

Name:	IMG_20150616_172544.jpg
Views:	271
Size:	30.5 KB
ID:	139356  
nick-tech is offline   Reply With Quote
Old 06-22-2015, 06:42 AM   #79
nick-tech
Enthusiast
nick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned offnick-tech can read ebooks with the screen turned off
 
Posts: 46
Karma: 97694
Join Date: Feb 2012
Device: kindle touch
hasn't anyone an idea how to fix this?
nick-tech is offline   Reply With Quote
Old 06-22-2015, 08:04 PM   #80
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by nick-tech View Post
hasn't anyone an idea how to fix this?
You're on the right track, just keep experimenting with _batteryCurrentEl.style properties. Google for css reference and javascript style object and try to add/use various combinations of properties and theirs' values. Also reference to files in /usr/share/webkit-1.0/pillow for original HTML and CSS defining status bar view. It will take time, but (generally speaking) that's how I did it
eureka is offline   Reply With Quote
Advert
Old 08-13-2015, 02:51 PM   #81
ssholloway
Connoisseur
ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.
 
ssholloway's Avatar
 
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
FW 5.6.5 error

Quote:
Originally Posted by twobob View Post
one release fits all :

Code:
PLATFORM="$(cat /sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes)"
On a PW2 running fw 5.6.5, I get

cat: can't open '/sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes': No such file or directory

and I couldn't find the "mxc_epdc_fb" directory when I looked in /sys/devices/platform/. I did find a "imx_epdc_fb" directory with the same structure. Would someone please verify that the imx directory can be used instead of the mxc directory? I really miss my % battery indicator.

Thanks.

Last edited by ssholloway; 08-13-2015 at 03:02 PM.
ssholloway is offline   Reply With Quote
Old 08-13-2015, 03:46 PM   #82
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
What are the contents of that file?

...
All it is doing is checking to see what size should be applied to "_batteryMeterEl.style.marginTop"

Play with the red bit until it looks nice:
Code:
#!/bin/sh
SCRIPT=""


SCRIPT=`cat << 'JAVASCRIPT' | tr -d '\n' | sed -e 's,",\\\\",g'
(function () {
  var _batteryMeterId = BatteryState.batteryFillDiv,
      _batteryMeterEl = _batteryMeterId && document.getElementById(_batteryMeterId),
      _currentBatteryLevel = nativeBridge.getIntLipcProperty("com.lab126.powerd", "battLevel"),
      _originalResolveLabel = BatteryState.resolveLabel;

  if (!_batteryMeterEl || !_originalResolveLabel) {
    return;
  }

  /* Text should be WHITE to be visible. */      
  _batteryMeterEl.style.color = "white";
  /* Hack style to set vertical alignment of text. */
  _batteryMeterEl.style.lineHeight = "5.2pt";
  /* Add style for smaller font size. */
  _batteryMeterEl.style.fontSize = "7.2pt";
  /* Background color for hiding the battery */
  _batteryMeterEl.style.backgroundColor="black";
  _batteryMeterEl.style.marginTop="-1.6pt";
  _batteryMeterEl.style.marginLeft="-2pt";
  _batteryMeterEl.style.width="20pt";
  _batteryMeterEl.style.minWidth="20pt";
  _batteryMeterEl.style.height="12pt";
  _batteryMeterEl.style.paddingTop="0.8pt";

  if (_currentBatteryLevel) {
    _batteryMeterEl.textContent = _currentBatteryLevel + "%";
  }
      
  BatteryState.resolveLabel = function () {
    var batteryMeterId = BatteryState.batteryFillDiv,
        batteryMeterEl = batteryMeterId && document.getElementById(batteryMeterId);
        
    _originalResolveLabel();
    
    if (batteryMeterEl) {
      batteryMeterEl.textContent = BatteryState.percent + "%";
    }
  };
})();
`

MESSAGE='{
  "pillowId": "default_status_bar",
  "function": "'${SCRIPT}'"
}'

lipc-set-prop -s com.lab126.pillow interrogatePillow "$MESSAGE"

Last edited by eschwartz; 08-13-2015 at 03:49 PM.
eschwartz is offline   Reply With Quote
Old 08-13-2015, 05:28 PM   #83
ssholloway
Connoisseur
ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.
 
ssholloway's Avatar
 
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
Quote:
Originally Posted by eschwartz View Post
All it is doing is checking to see what size should be applied to "_batteryMeterEl.style.marginTop"

Play with the red bit until it looks nice:
Thanks. I'll fiddle with the top margin value this evening and let you know what happens.
ssholloway is offline   Reply With Quote
Old 08-14-2015, 01:10 AM   #84
ssholloway
Connoisseur
ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.
 
ssholloway's Avatar
 
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
OK, this is weird. I replaced the old batterylevel.sh file in extensions on the PW2 with the code eschwartz provided. Opened KUAL, selected "Show battery %" and nothing happens except the text "bin/batterylevel.sh" appears at the bottom of the screen. I don't get any kind of error message in the KUAL log.

I can't figure out what I'm doing wrong. If someone running 5.6.5 would try eschwartz's code, I'd appreciate any feedback you might have.
ssholloway is offline   Reply With Quote
Old 08-14-2015, 01:39 AM   #85
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
That "function () ... " statement looks a bit odd to me.
There may be a few missing lines in the posted code.
You might be able to spot what is the problem by comparing it with the old script file.
knc1 is offline   Reply With Quote
Old 08-14-2015, 02:12 AM   #86
ssholloway
Connoisseur
ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.
 
ssholloway's Avatar
 
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
Quote:
Originally Posted by knc1 View Post
That "function () ... " statement looks a bit odd to me.
There may be a few missing lines in the posted code.
You might be able to spot what is the problem by comparing it with the old script file.
The function statement is the same in the original. The original file had code for both a Touch and a PW. This is only the PW code and appears to be the same as the PW code in the original.

I'm beginning to think the coding for the status bar view has changed. I've never played with "pillow" before but I'll look at the HTML and CSS that defines the status bar as mentioned in post 80 right above my first one.
ssholloway is offline   Reply With Quote
Old 08-14-2015, 02:22 AM   #87
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
knc1 -- Pure copy-paste. Although I stripped out the platform test and the duplicated SCRIPT (I would've tried to use sed to replace the size based on a variable from the platform test).
Is it the missing EOF in the heredoc? Made me wonder too -- but apparently the Kindle consumes it just fine.

Last edited by eschwartz; 08-14-2015 at 02:24 AM.
eschwartz is offline   Reply With Quote
Old 08-14-2015, 09:45 AM   #88
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by eschwartz View Post
- - - -
Is it the missing EOF in the heredoc?
- - - -
Yes, nice catch.
I didn't spot the missing:
Code:
JAVASCRIPT
It must have gotten 'cut' or fell off of the 'paste' brush.

Last edited by knc1; 08-14-2015 at 09:47 AM.
knc1 is offline   Reply With Quote
Old 08-16-2015, 09:25 PM   #89
ssholloway
Connoisseur
ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.ssholloway has a complete set of Star Wars action figures.
 
ssholloway's Avatar
 
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
Quote:
Originally Posted by knc1 View Post
Yes, nice catch.
I didn't spot the missing:
Code:
JAVASCRIPT

OK. It's been a l-o-n-g time since I did any programming. I assume JAVASCRIPT (acting as an EOF) should be inserted after the })() and before the ` that is on the next line, correct? Let me know where it should go and I'll try it out. The code worked without the EOF under fw 5.4.2 but things may be more picky under fw 5.6.5. Thanks.
ssholloway is offline   Reply With Quote
Old 08-16-2015, 10:18 PM   #90
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Correct.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
support for IBM/360/370/S-390 code on the Kindles (KUAL) knc1 Kindle Developer's Corner 63 01-08-2014 07:02 PM
Bible app for e-ink Kindles (Kindle Active Content) draytonbenner Self-Promotions by Authors and Publishers 0 10-18-2012 11:23 AM
iPad Amazon’s Kindle iOS app now ready for the new iPad’s Retina*Display monkeyluis Apple Devices 9 03-18-2012 09:27 PM
A tray app for Calibre ? thomass Calibre 3 08-21-2011 06:19 PM
So is the Iliad really production ready and is the market ready for e-readers? pdam iRex 28 09-14-2006 06:24 PM


All times are GMT -4. The time now is 09:19 AM.


MobileRead.com is a privately owned, operated and funded community.