{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello users with your T230 / NU. While I didn't do a custom ROM (insert sad ohhhh sound here), I did create this small custom kernel.
Currently I reached my deadline because my friend needed his tab back. I can't promise if this project continues or not, but I will keep you up with news! I thank you all for being awesome and I appreciate every download! More info on my comment on page 8 of this thread.
You must have root for some features (ex. Overclocking)
Thanks list : @moonbutt74, @g_ding84, @laufersteppenwolf, @KouenHasuki, @friedrich420, @TheFerhatKing
The reasons are mentioned in the 2nd comment of this thread. I beg you to take a look and give them a thanks for what they have done! They deserve it !
Disclaimer : I am not responsible for any damage dealt to the device or SD cards, nor am i responsible for the breakout of ww3 or a zombie Apocalypse. REMEMBER IT'S YOUR CHOICE TO FLASH THIS KERNEL
Now to the facts:
If you use the Odin version and your cpu settings don't save / stick after exiting your preferred kernel tweak app, download the custom recovery version!
Current features in kernel (v4.0) :
- removal of dvfs
- overclock to 1344mhz
- custom I/O schedulers
- custom CPU governors
Changelog :
v4.0 - Ported dancedance, adaptive, lionheart (may have a tiny risk of crashing but gave me the best gaming experience so far) and wheatley govs from @friedrich420 's N4 TMO AEL Kernel
v3.0 - Ported row, sio and vr I/O Schedulers from @laufersteppenwolf's werewolf kernel and reverted cpu clockspeed to 1344Mhz
v2.2 - Overclock from 1183 Mhz (or 1248/1344 for users with V2.0/2.1) to 1444 Mhz -Warning - this may run unstable on your device. I recommend using v2.1
v2.1 - Overclock from 1183 Mhz (or 1248 for users with V2.0) to 1344 Mhz
v2.0 - Overclock from 1183 Mhz to 1248 Mhz
v1.0 - removed DVFS (Dynamic voltage and frequency scaling)
What do the changes do :
Ported CPU governors - A CPU governor in Android controls how the CPU raises and lowers its frequency in response to the demands the user is placing on their device. Governors are especially important in smartphones and tablets because they have a large impact on the apparent fluidity of the interface and the battery life of the device over a charge. More information here http://androidmodguide.blogspot.cz/p/blog-page.html
Ported I/O Schedulers - Input/output (I/O) scheduling is a term used to describe the method computer operating systems decide the order that block I/O operations will be submitted to storage volumes. More information here : http://androidmodguide.blogspot.cz/p/io-schedulers.html - If you use no-frills CPU control, the app might freeze. If so, use kernel toolkit
removal of DVFS - Dynamic voltage and frequency scaling can lead to extreme lag after running heavy tasks such as gaming for some time. This feature also cheated on different benchmarks, that show allot higher results than the phone actually preforms like in everyday apps. A restart would be the only fix
CPU overclock - This will higher your cpu clock speed higher than factory set and will boost your processor speed. Warning : Since overclocking is beyond factory setting, there always is a slight risk that it can damage your CPU, with that said, it can shorten the life span and will make your device usually run hotter. It may also drain more battery.
Proofs
removal of DVFS - While I sadly don’t have a 100% proof that it is really disabled since I currently don't know how to, chances are high that it is disabled since the menuconfig displayed it as off. Also there was no sign of dvfs actions in a log running things from benchmarks to 3d games. @g_ding84 does have a few more proofs in the comments.
CPU overclocking - 100% proof on over clocking apps that confirm the clock speed does indeed exist in the kernel. It also gives a improvement in mainly the cpu section of benchmarks.
Ported I/O Schedulers - 100 % Kernel tweak apps (preffered kernel toolkit) will show those I/O's
Ported CPU governors - 100 % Kernel tweak apps (preffered kernel toolkit) will show those governors
Github (please read all comments for the commits if there are any)
https://github.com/ctxgaming/android_kernel_samsung_degaswifi
Tested on:
Samsung Galaxy tab 4 T230NU
Instructions to flash in 1st commend of this thread
Download link for kernel :
Custom Recovery version (Recommended)
v4.0 - http://www.mediafire.com/download/7lpg2p5k0f49fqi/4.0.zip
v3.0 - http://www.mediafire.com/download/6uihelip6nmgahe/3.0.zip - If you use no-frills CPU control, the app might freeze. If so, use kernel toolkit
V2.2 -http://www.mediafire.com/download/68vxidyxvz43a58/CPU-Tweaks-V2.2.zip - Warning - this may run unstable on your device. I recommend using v2.1 or 3.0+
v2.1 - http://www.mediafire.com/download/j2h799vi6dv7j1l/CPU-Tweaks-V2.1.zip by @laufersteppenwolf
v2.0 - http://www.mediafire.com/download/94j5v7p2uoe52tb/CPU-Tweaks-V2.0.zip
v1.0 - https://www.dropbox.com/s/3opaikamkewfpgo/custom_kernel_CTZx.zip?dl=0 converted by @g_ding84
Odin image:
v4.0 - http://www.mediafire.com/download/rdm9oj5ccaocjxq/boot.img.tar.md5
v3.0 - http://www.mediafire.com/download/97oq0da5nyf527v/boot.img.tar.md5 - If you use no-frills CPU control, the app might freeze. If so, use kernel toolkit
v2.2 -http://www.mediafire.com/download/9cr9zzs7i3i5qi7/boot.img.tar.md5 - Warning - this may run unstable on your device. I recommend using v2.1 or 3.0+
v2.1 - http://www.mediafire.com/download/43mpnyiv67wflde/boot.img.tar.md5 by @laufersteppenwolf
v2.0 - http://www.mediafire.com/download/w1kacfo4yip87d7/boot.img.tar.md5
v1.0 - http://www.mediafire.com/download/pn8asxz2px69px7/boot.img.tar.md5
If you decide to rollback to stock (links by @g_ding84) :
STOCK KERNELS - T230 T230NU & T231
T230 KERNEL
OC1 : https://www.androidfilehost.com/?fid=95916177934547294
MD5 SUM : 8e3d724a239b159c608d547eeea0fcb6
OD2 : https://www.androidfilehost.com/?fid=24052804347799717
MD5 SUM : 0141fc2445697e05a2225308a6d1b76e
T230NU KERNEL
OC1 : https://www.androidfilehost.com/?fid=95916177934547295
MD5 SUM : ec1367bad15c1b96aa0d1180448c47a7
OD1 : https://www.androidfilehost.com/?fid=24052804347799719
MD5 SUM : 785546f2c2b1e472c3ca386b7d2fffad
Contributors
CTXz, laufersteppenwolf
Source Code: https://github.com/ctxgaming/android_kernel_samsung_degaswifi
Kernel Special Features: Removal of DVFS, Overclocking, New I/O schedulers, new CPU governors
Version Information
Status: Testing
Created 2015-05-06
Last Updated 2015-05-11
XDA:DevDB Information
CPU Tweaks for Tab 4 T230 / NU, Kernel for the Samsung Galaxy Tab 4
Contributors
CTXz, laufersteppenwolf
Source Code: https://github.com/ctxgaming/android_kernel_samsung_degaswifi
Kernel Special Features: Removal od DVFS and Overclocking
Version Information
Status: No Longer Updated
Created 2015-05-06
Last Updated 2015-07-01
XDA:DevDB Information
CPU Tweaks for Tab 4 T230 / NU, Kernel for the Samsung Galaxy Tab 4
Contributors
CTXz, laufersteppenwolf
Source Code: https://github.com/ctxgaming/android_kernel_samsung_degaswifi
Kernel Special Features: Removal od DVFS and Overclocking
Version Information
Status: No Longer Updated
Created 2015-05-06
Last Updated 2015-08-04
XDA:DevDB Information
CPU Tweaks for Tab 4 T230 / NU, Kernel for the Samsung Galaxy Tab 4
Contributors
CTXz, laufersteppenwolf
Source Code: https://github.com/ctxgaming/android_kernel_samsung_degaswifi
Kernel Special Features: Removal od DVFS and Overclocking
Version Information
Status: No Longer Updated
Created 2015-05-06
Last Updated 2015-09-01
Instructions for flashing with custom recovery:
1. Make sure your tab has a custom recovery installed. I will explain for twrp mainly on these instructions. If you do not have twrp, you can grab it here: http://forum.xda-developers.com/tab-4/orig-development/twrp-2-7-1-0-galaxy-tab-4-7-0-t2830030
2. Download the flashable zip from the download links below ( custom recovery flashable )
3. Connect your tab 4 into your pc.
4. Move the image to your sd card (preffered) or to your system storage
5. Turn off your tab and boot it into custom recovery
(power + home + volume up on twrp)
6. Then select install. Do not wipe anything since we dont have to. Tough you can wipe the davlik cache for extra save results.
7. Search the zip and select it
8. Swipe to flash
9. Wait till its done
10. Enjoy!
Instructions for ODIN3 flash
PLEASE READ ALL STEPS AND DON'T PLAY AROUND WITH ODIN3. IF YOU SCREW WITH ODIN IT WILL BRICK YOUR DEVICE!
Instruction :
1. Download odin 3.07
2. Download the kernel
3. Download samsung usb drivers for pc
4. Turn off your tab 4
5. Hold volume up + power + home
6. Press volume up if it asks to continue or not
7. Plug your tab into your pc
8. Open odin as administrator (right click > run as admin)
9. Click PDA and choose the kernel
10. Make sure that only auto reboot and f. Reset time are checked.
11. Click start and it will flash and wait till it will reboot.
12. Done
Special thanks to:
@TheFerhatKing For atleast trying to Port this to the T231
@moonbutt74. Give this guy a thanks and a cookie, because without him there is no way I would even be able to compile the kernel, nor boot it!
@g_ding84 for making the custom recovery flashable zip, comparing his and mine tab for testing and mentioning my kernel is his ROM thread ! Check out his ROM here!
@laufersteppenwolf for the additional overclock. I call him the god of marvell processors! I own my life to him for taking his time to work on my source code, this guy is just awesome! If you have a tab 3 7.0 (t210 or t211) then why don't you check out his kernel here!
@KouenHasuki for being available and ready to flash in situations where I just don't have time, and for being helpfull as possible!
@friedrich420 , if you will ever read this or come across this thread, I would thank you allot for pushing your N4 TMO AEL Kernel to github. It makes allot of my work easier since you device uses the same kernel version as mine (3.10)! So porting features gives me less headaches because of YOUR kernel. Thanks allot man!
Without these people the kernel wouldn't be, what it is and what it will become so give them their thanks!
Got it flashed and boot up. I'll be testing it but so far running smooth. great work . I look forward to seeing you next version
Kernel Tuner. Stock voltages and clock speed. Seems to ramp down quicker. Always a good thing.
g_ding84 said:
Kernel Tuner. Stock voltages and clock speed. Seems to ramp down quicker. Always a good thing.
Click to expand...
Click to collapse
Thanks allot for those news man. Really glad to hear this.
PS: I use your rom. Its awesome
Good news everyone! It seems like I found the file with the clock speed in it! I will be giving you reports once the compile is done!
So i seem to have managed to do something with the clock speed. The phone showed 1,066 ghz and then after a while (i assume it went into a too high clock) it crashed. I will log and investigate further. This is good news :good:
alright so this is confusing
I managed to get to overclock results but it runs very laggy.
Any help or reason would be appriciated
Overclock achieved successfully
Hello sorry if I am a bit hyped right now! As the title says I managed to get a successful overclock without any lag or crashing. Currently its only +65mhz ( from 1183 to 1248 mhz ) after atleast 20 flashes its finally there. I am planning to get the clockspeed higher later but for now i will let it like this. Please be noted that this may drain your battery faster and make your device run hotter. I will be releasing a under clock kernel in the future. Expect to get the commits on git hub and and the link for the update soon!
-Greetings CTXz
happy overclocking!
V2.0 OUT!
V2.0 Is now out with the yet minor overclock. Sorry for the delay. I had some issues with github and after fighting from 11pm to 2am I finally got them done correctly
Works perfectly on my t230 ?
Do you have any ideas to fix plants vs zombies 2 ? ?
Thanks
Huge thanks for your efforts! Planning on giving this a shot when my cat stops harassing me for attention
KouenHasuki said:
Huge thanks for your efforts! Planning on giving this a shot when my cat stops harassing me for attention
Click to expand...
Click to collapse
Seems to be working great! I even benchmarked it (Quadrant Standard) and it shows the performance is up too! (CPU, Mem, I/O and 3D scored Higher. 2D remained the same)
Before: 4473
After: 4672
Screenshots are available upon request, I don't have the post count to attach images as of yet
From what I was just reading over on the Marvell website the product brief on the Marvell PXA1088 is designed for 1.5GHz
Source: http://www.marvell.com/communication-processors/pxa1088/assets/Marvell_PXA1088-PRO_product_brief.pdf
Also I am sorry for the double post but I cannot see where I can edit my old one
KouenHasuki said:
Seems to be working great! I even benchmarked it (Quadrant Standard) and it shows the performance is up too! (CPU, Mem, I/O and 3D scored Higher. 2D remained the same)
Before: 4473
After: 4672
Screenshots are available upon request, I don't have the post count to attach images as of yet
From what I was just reading over on the Marvell website the product brief on the Marvell PXA1088 is designed for 1.5GHz
Source: http://www.marvell.com/communication-processors/pxa1088/assets/Marvell_PXA1088-PRO_product_brief.pdf
Also I am sorry for the double post but I cannot see where I can edit my old one
Click to expand...
Click to collapse
Thanks for the feedback. Indeed they can hold up to 1482 Mhz. The problem is that there is (what i would like to call) a voltage table thingy. What it does is, it allows only specific clock speeds to be used. So for instance I over clock to to just 1244 instead of 1248 and the entire kernel goes full lag.
CTXz said:
Thanks for the feedback. Indeed they can hold up to 1482 Mhz. The problem is that there is (what i would like to call) a voltage table thingy. What it does is, it allows only specific clock speeds to be used. So for instance I over clock to to just 1244 instead of 1248 and the entire kernel goes full lag.
Click to expand...
Click to collapse
Indeed, your a better man than I for taking on this challenge! Finding the balance between the Voltage and Clock is key here and not something that will come easy.
Though if you can work out the CPU to Voltage maybe you could calculate to help find a rough area to at least work with in stages higher though I doubt it will be a 1:1 calculation of every 50MHz = .025v increase style
It sadly isn't so easy to find what clock works and what not. If I set it to the max speed of the clock speed given, it won't even boot because it crashes upon starting. Just to give you a little look inside the code (before OC, check github for changes) :
Code:
static struct cpu_rtcwtc cpu_rtcwtc_1088[] = {
{.max_pclk = 312, .l1_rtc = 0x02222222, .l2_rtc = 0x00002221,},
{.max_pclk = 800, .l1_rtc = 0x02666666, .l2_rtc = 0x00006265,},
{.max_pclk = 1183, .l1_rtc = 0x2AAAAAA, .l2_rtc = 0x0000A2A9,},
{.max_pclk = 1482, .l1_rtc = 0x02EEEEEE, .l2_rtc = 0x0000E2ED,},
};
static struct cpu_rtcwtc cpu_rtcwtc_1x88[] = {
{.max_pclk = 624, .l1_rtc = 0x02222222, .l2_rtc = 0x00002221,},
{.max_pclk = 1066, .l1_rtc = 0x02666666, .l2_rtc = 0x00006265,},
{.max_pclk = 1283, .l1_rtc = 0x2AAAAAA, .l2_rtc = 0x0000A2A9,},
{.max_pclk = 1482, .l1_rtc = 0x02EEEEEE, .l2_rtc = 0x0000E2ED,},
};
struct core_parents_table parent_table[] = {
{
.parent_name = "pll1_624",
.hw_sel_val = AP_CLK_SRC_PLL1_624,
},
{
.parent_name = "pll1_1248",
.hw_sel_val = AP_CLK_SRC_PLL1_1248,
},
{
.parent_name = "pll2",
.hw_sel_val = AP_CLK_SRC_PLL2,
},
{
.parent_name = "pll2p",
.hw_sel_val = AP_CLK_SRC_PLL2P,
},
/* Since hw_sel_val = 0x1 can select pll1_1248 or pll3p,
we use bit 1 to indicate src selection of pll3p */
{
.parent_name = "pll3p",
.hw_sel_val = AP_CLK_SRC_PLL3P,
},
};
static const char *core_parent[] = {"pll1_624", "pll1_1248", "pll2", "pll2p",
"pll3p",};
/* The PP table only list the possible op here */
static struct cpu_opt pxa1x88_op_array[] = {
{
.pclk = 312,
.pdclk = 156,
.baclk = 156,
.ap_clk_sel = AP_CLK_SRC_PLL1_624,
},
{
.pclk = 624,
.pdclk = 312,
.baclk = 156,
.ap_clk_sel = AP_CLK_SRC_PLL1_624,
},
{
.pclk = 800,
.pdclk = 400,
.baclk = 200,
.ap_clk_sel = AP_CLK_SRC_PLL2P,
},
{
.pclk = 1066,
.pdclk = 533,
.baclk = 266,
.ap_clk_sel = AP_CLK_SRC_PLL2P,
},
{
.pclk = 1183,
.pdclk = 624,
.baclk = 312,
.ap_clk_sel = AP_CLK_SRC_PLL3P,
},
{
.pclk = 1248,
.pdclk = 624,
.baclk = 312,
.ap_clk_sel = AP_CLK_SRC_PLL1_1248,
},
{
.pclk = 1482,
.pdclk = 741,
.baclk = 370,
.ap_clk_sel = AP_CLK_SRC_PLL3P,
},
};
struct core_params pxa1x88_core_params = {
.core_offset = &pxa988_reg_off,
.parent_table = parent_table,
.parent_table_size = ARRAY_SIZE(parent_table),
.cpu_opt = pxa1x88_op_array,
.cpu_opt_size = ARRAY_SIZE(pxa1x88_op_array),
.cpu_rtcwtc_table = cpu_rtcwtc_1x88,
.cpu_rtcwtc_table_size = ARRAY_SIZE(cpu_rtcwtc_1x88),
.max_cpurate = 1183,
.dcstat_support = true,
.shared_lock = &pll3_lock,
};
Any smart math brain would be appriciated
CTXz said:
It sadly isn't so easy to find what clock works and what not. If I set it to the max speed of the clock speed given, it won't even boot because it crashes upon starting. Just to give you a little look inside the code (before OC, check github for changes) :
Code:
static struct cpu_rtcwtc cpu_rtcwtc_1088[] = {
{.max_pclk = 312, .l1_rtc = 0x02222222, .l2_rtc = 0x00002221,},
{.max_pclk = 800, .l1_rtc = 0x02666666, .l2_rtc = 0x00006265,},
{.max_pclk = 1183, .l1_rtc = 0x2AAAAAA, .l2_rtc = 0x0000A2A9,},
{.max_pclk = 1482, .l1_rtc = 0x02EEEEEE, .l2_rtc = 0x0000E2ED,},
};
static struct cpu_rtcwtc cpu_rtcwtc_1x88[] = {
{.max_pclk = 624, .l1_rtc = 0x02222222, .l2_rtc = 0x00002221,},
{.max_pclk = 1066, .l1_rtc = 0x02666666, .l2_rtc = 0x00006265,},
{.max_pclk = 1283, .l1_rtc = 0x2AAAAAA, .l2_rtc = 0x0000A2A9,},
{.max_pclk = 1482, .l1_rtc = 0x02EEEEEE, .l2_rtc = 0x0000E2ED,},
};
struct core_parents_table parent_table[] = {
{
.parent_name = "pll1_624",
.hw_sel_val = AP_CLK_SRC_PLL1_624,
},
{
.parent_name = "pll1_1248",
.hw_sel_val = AP_CLK_SRC_PLL1_1248,
},
{
.parent_name = "pll2",
.hw_sel_val = AP_CLK_SRC_PLL2,
},
{
.parent_name = "pll2p",
.hw_sel_val = AP_CLK_SRC_PLL2P,
},
/* Since hw_sel_val = 0x1 can select pll1_1248 or pll3p,
we use bit 1 to indicate src selection of pll3p */
{
.parent_name = "pll3p",
.hw_sel_val = AP_CLK_SRC_PLL3P,
},
};
static const char *core_parent[] = {"pll1_624", "pll1_1248", "pll2", "pll2p",
"pll3p",};
/* The PP table only list the possible op here */
static struct cpu_opt pxa1x88_op_array[] = {
{
.pclk = 312,
.pdclk = 156,
.baclk = 156,
.ap_clk_sel = AP_CLK_SRC_PLL1_624,
},
{
.pclk = 624,
.pdclk = 312,
.baclk = 156,
.ap_clk_sel = AP_CLK_SRC_PLL1_624,
},
{
.pclk = 800,
.pdclk = 400,
.baclk = 200,
.ap_clk_sel = AP_CLK_SRC_PLL2P,
},
{
.pclk = 1066,
.pdclk = 533,
.baclk = 266,
.ap_clk_sel = AP_CLK_SRC_PLL2P,
},
{
.pclk = 1183,
.pdclk = 624,
.baclk = 312,
.ap_clk_sel = AP_CLK_SRC_PLL3P,
},
{
.pclk = 1248,
.pdclk = 624,
.baclk = 312,
.ap_clk_sel = AP_CLK_SRC_PLL1_1248,
},
{
.pclk = 1482,
.pdclk = 741,
.baclk = 370,
.ap_clk_sel = AP_CLK_SRC_PLL3P,
},
};
struct core_params pxa1x88_core_params = {
.core_offset = &pxa988_reg_off,
.parent_table = parent_table,
.parent_table_size = ARRAY_SIZE(parent_table),
.cpu_opt = pxa1x88_op_array,
.cpu_opt_size = ARRAY_SIZE(pxa1x88_op_array),
.cpu_rtcwtc_table = cpu_rtcwtc_1x88,
.cpu_rtcwtc_table_size = ARRAY_SIZE(cpu_rtcwtc_1x88),
.max_cpurate = 1183,
.dcstat_support = true,
.shared_lock = &pll3_lock,
};
Any smart math brain would be appriciated
Click to expand...
Click to collapse
So I had a look and a bit of a think, I couldnt see any obvious pattern in the pclk's though here they are if anyone wanted what I noted down:
Code:
static struct cpu_rtcwtc cpu_rtcwtc_1088
.Max_pclk 312 per mhz is = to
.l1_rtc = 0x0000B1E0
.l2_rtc = 0x0000000B
.Max_pclk 800 per mhz is = to
.l1_rtc = 0x00004CCC
.l2_rtc = 0x0000000C
.Max_pclk 1183 per mhz is = to
.l1_rtc = 0x000026FB
.l2_rtc = 0x00000009
.Max_pclk 1482 per mhz is = to
.l1_rtc = 0x0000249D
.l2_rtc = 0x0000000B
static struct cpu_rtcwtc cpu_rtcwtc_1x88
.Max_pclk 624 per mhz is = to
.l1_rtc = 0x000058F0
.l2_rtc = 0x00000005
.Max_pclk 1066 per mhz is = to
.l1_rtc = 0x00002577
.l2_rtc = 0x00000006
.Max_pclk 1283 per mhz is = to
.l1_rtc = 0x000024E0
.l2_rtc = 0x00000008
.Max_pclk 1482 per mhz is = to
.l1_rtc = 0x0000249D
.l2_rtc = 0x0000000B
But then I was looking over the commits
I noticed that you upped the 1183MHz to 1248MHz which was 35MHz less than the normal referenced 1283MHz, So I got to be thinking would instead of 1482MHz maybe 1447MHz would work with the same reduction of 35MHz?
Just some thoughts looking it over (sorry I am not a coder just thinking and looking at things that stand out to me)
KouenHasuki said:
So I had a look and a bit of a think, I couldnt see any obvious pattern in the pclk's though here they are if anyone wanted what I noted down:
Code:
static struct cpu_rtcwtc cpu_rtcwtc_1088
.Max_pclk 312 per mhz is = to
.l1_rtc = 0x0000B1E0
.l2_rtc = 0x0000000B
.Max_pclk 800 per mhz is = to
.l1_rtc = 0x00004CCC
.l2_rtc = 0x0000000C
.Max_pclk 1183 per mhz is = to
.l1_rtc = 0x000026FB
.l2_rtc = 0x00000009
.Max_pclk 1482 per mhz is = to
.l1_rtc = 0x0000249D
.l2_rtc = 0x0000000B
static struct cpu_rtcwtc cpu_rtcwtc_1x88
.Max_pclk 624 per mhz is = to
.l1_rtc = 0x000058F0
.l2_rtc = 0x00000005
.Max_pclk 1066 per mhz is = to
.l1_rtc = 0x00002577
.l2_rtc = 0x00000006
.Max_pclk 1283 per mhz is = to
.l1_rtc = 0x000024E0
.l2_rtc = 0x00000008
.Max_pclk 1482 per mhz is = to
.l1_rtc = 0x0000249D
.l2_rtc = 0x0000000B
But then I was looking over the commits
I noticed that you upped the 1183MHz to 1248MHz which was 35MHz less than the normal referenced 1283MHz, So I got to be thinking would instead of 1482MHz maybe 1447MHz would work with the same reduction of 35MHz?
Just some thoughts looking it over (sorry I am not a coder just thinking and looking at things that stand out to me)
Click to expand...
Click to collapse
Hey I will send you a pm for my google hangouts acc!
CTXz said:
Hey I will send you a pm for my google hangouts acc!
Click to expand...
Click to collapse
So I have been testing the stability of the kernel and so far its rock solid, watched 3 hours of twitch non stop and nothing happened, I have benchmarked it a few times fine and lastly stress tested it.
No issues at all and only a very minimal increase in temps (this stress test was done in a leather case and removed and checked before ending the stress test
Related
Hey guys,
Have you ever had problem logging on a SSL certificate network?? An example is the cisco authentication on the wifi ( like my college has ). Well looking around I found this solution posted by dalvik.
http://code.google.com/p/android/issues/detail?id=1597#c18
This certainly is something that will be released on source.android.com (aka aosp)
when the Froyo code is released. In the meanwhile, I tryed to explain the change so
that people making custom ROMs could feel free to fix it. To be more explicit, here
is the exact diff:
diff --git a/core/java/android/net/http/SslCertificate.java
b/core/java/android/net/http/SslCertificate.java
index 46b2bee..2214405 100644
--- a/core/java/android/net/http/SslCertificate.java
+++ b/core/java/android/net/http/SslCertificate.java
@@ -196,26 +196,31 @@ public class SslCertificate {
*/
public DName(String dName) {
if (dName != null) {
- X509Name x509Name = new X509Name(mDName = dName);
-
- Vector val = x509Name.getValues();
- Vector oid = x509Name.getOIDs();
-
- for (int i = 0; i < oid.size(); i++) {
- if (oid.elementAt(i).equals(X509Name.CN)) {
- mCName = (String) val.elementAt(i);
- continue;
- }
-
- if (oid.elementAt(i).equals(X509Name.O)) {
- mOName = (String) val.elementAt(i);
- continue;
- }
-
- if (oid.elementAt(i).equals(X509Name.OU)) {
- mUName = (String) val.elementAt(i);
- continue;
+ mDName = dName;
+ try {
+ X509Name x509Name = new X509Name(dName);
+
+ Vector val = x509Name.getValues();
+ Vector oid = x509Name.getOIDs();
+
+ for (int i = 0; i < oid.size(); i++) {
+ if (oid.elementAt(i).equals(X509Name.CN)) {
+ mCName = (String) val.elementAt(i);
+ continue;
+ }
+
+ if (oid.elementAt(i).equals(X509Name.O)) {
+ mOName = (String) val.elementAt(i);
+ continue;
+ }
+
+ if (oid.elementAt(i).equals(X509Name.OU)) {
+ mUName = (String) val.elementAt(i);
+ continue;
+ }
}
+ } catch (IllegalArgumentException ex) {
+ // thrown if there is an error parsing the string
}
}
}
I'm not a developer and I don't have idea how to implement this patch to the rom, but if anybody knows how, I'll be happy to test the rom.
Thanks
Christian
Kernel 2.6.32 (Overclocked & Undervolted)
Read ahead 128Kb
Max 1113Mhz (for now)
minimum [email protected]
maximum [email protected]
BFS (Brain F*ck Scheduler).
CFQ Scheduler
Pershoot's audiomod (loudness).
EXT4
tun.ko module
CIFS (+utf8)
NFS
Current acpu table:
Code:
struct clkctl_acpu_speed acpu_freq_tbl[] = {
{ 19200, CCTL(CLK_TCXO, 1), SRC_RAW, 0, 0, 950, 14000 },
{ 128000, CCTL(CLK_TCXO, 1), SRC_AXI, 0, 0, 950, 14000 },
{ 245000, CCTL(CLK_MODEM_PLL, 1), SRC_RAW, 0, 0, 950, 29000 },
/* Work arround for acpu resume hung, GPLL is turn off by arm9 */
/*{ 256000, CCTL(CLK_GLOBAL_PLL, 3), SRC_RAW, 0, 0, 1050, 29000 },*/
{ 384000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0A, 0, 975, 58000 },
{ 422400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0B, 0, 975, 117000 },
{ 460800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0C, 0, 1000, 117000 },
{ 499200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0D, 0, 1025, 117000 },
{ 537600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0E, 0, 1025, 117000 },
{ 576000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x0F, 0, 1050, 117000 },
{ 614400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x10, 0, 1075, 117000 },
{ 652800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x11, 0, 1100, 117000 },
{ 691200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x12, 0, 1125, 117000 },
{ 729600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x13, 0, 1150, 117000 },
{ 768000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x14, 0, 1175, 128000 },
{ 806400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x15, 0, 1200, 128000 },
{ 844800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x16, 0, 1200, 128000 },
{ 883200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x17, 0, 1225, 128000 },
{ 921600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x18, 0, 1225, 128000 },
{ 960000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x19, 0, 1250, 128000 },
{ 998400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1A, 0, 1250, 128000 },
{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1275, 128000 },
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1275, 128000 },
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1300, 128000 },
{ 0 },
};
Personal github: http://github.com/richardtrip/bravo-2.6.32
Pershoot github (audiomod): http://github.com/pershoot/
Original HTC kernel: http://member.america.htc.com/download/RomCode/Source_and_Binaries/bravo-2.6.32-gd96f2c0.tar.gz
Only use this if you have a Sense ROM (no defrost/cyanogenmod/AOSPDesire/opendesire/)
Download:
Froyo Kernel [email protected] min
Froyo Kernel [email protected] min
Froyo Kernel V5f 1190Mhz max
Froyo Kernel V5f 1113Mhz max
No Audiomod versions:
Froyo Kernel [email protected] min No Audiomod version
Froyo Kernel [email protected] min No Audiomod version
Froyo Kernel V5f 1190Mhz max No Audiomod version
Froyo Kernel V5f 1113Mhz max No Audiomod version
Older kernels:
Froyo Kernel [email protected] min
Froyo Kernel [email protected] min
Froyo Kernel V5e 1190Mhz max
Froyo Kernel V5e 1113Mhz max
No Audiomod versions:
Froyo Kernel [email protected] min No Audiomod version
Froyo Kernel [email protected] min No Audiomod version
Froyo Kernel V5e 1190Mhz max No Audiomod version
Froyo Kernel V5e 1113Mhz max No Audiomod version
WiFi N-mode module:
WiFi N-mode V5 module
WiFi PM FAST module: WiFi PM Fast V5 module
Older version you can find here:
http://xda.richardtrip.org/kernels/Sense_kernels/
Flash with recovery or ROM Manager.
Changelog:
V5f:
Add BFS (Brain F*CK Scheduler).
V5e SVS + HAVS kernels audiomod & noaudiomod version :
Modded gpu driver (Thanks to snq-)
V5d HAVS kernels:
Changed the avs table to scale less on the higher frequencies. Could be more stable if you have problems on the V5c havs kernels.
V5c HAVS kernels:
HAVS [email protected] minimum
HAVS [email protected] minimum
V5b Test havs kernel
V5a 1190Mhz kernel (smartass governor is in but not default).
V5a (Smartass only):
changed default_ramp_up_step and max_ramp_down to 384000
set smartass as default governor
V5:
Add lzma compression for kernel images backported by snq-
Read ahead to 128Kb
V4:
Higher voltages (more stable, some phones had reboot problems)
V3:
WiFi PM FAST module posted (nmode also) (see this thread)
V3:
Added interactive scheduler
V2:
disabled debugging options
fixed ext2/3
added Performance and Conservative scheduler
reserved for future use
Ooooo THANKKKKK YOUUUUUUUUUUUUUUUUUUU ))))))))))))
I will flash now
"Flashed on AuraxTSense v7.8.1 work great i set to 1113Mhz
and really sense is faster i will report battery tomorrow"
richard
this kernel is only for your ROm or can be update to other ROM`s
hensk said:
richard
this kernel is only for your ROm or can be update to other ROM`s
Click to expand...
Click to collapse
Its is only for sense roms (not for my rom).
Richard how can we revert to stock (just in case)
Thanks!!
elmalote said:
Richard how can we revert to stock (just in case)
Thanks!!
Click to expand...
Click to collapse
Reflash your current rom (no wipe of course).
Hey great, sounds good for, just a question, is it possible to have the setting named "interactived" in set Cpu or it's not possible yet?
(sorry for my english I'm french lol)
those modules with all the debug syms are rather um... huge
nice script for repacking and rewriting boot.img
(after all the drama with htc, plz provide the diff at least )
Great tweak, thanks a lot mate ! I will try it now and tell you the feedback
--------------------------------------------
After installation all seems good i have attached some screen shots.
Very good work richardtrip i was waiting for something like that but can you explain me what are this functions please :
# CFQ Scheduler
# Pershoot's audiomod (loudness).
# EXT4
# tun.ko module
# CIFS (+utf8)
# NFS
And with more time can you add the mode "interactive" ins Set CPU if it's possible please
Regards.
HID support ?
Just installed on MCR r9 WIP 21/09/2010. Working fine!
Thanks!
How can I uv, do I need setCPU?
with this kernel what's i have? performance? better battery?
this is better then Kernel of leedroid?
Works like charm!
It's working on RCMixHD. Got 1558 in Quadrant
Thank you Mr. Richardtrip
Sorry, this is stupid question but... what is this app?
PTKTheBest said:
Sorry, this is stupid question but... what is this app?
Click to expand...
Click to collapse
Quadrant (search in market)
PTKTheBest said:
Sorry, this is stupid question but... what is this app?
Click to expand...
Click to collapse
Do a search on the market for Quadrant
That's what you're looking for
EDIT: I'm too slow
JohnnyD86 said:
Do a search on the market for Quadrant
That's what you're looking for
EDIT: I'm too slow
Click to expand...
Click to collapse
i have 1200, no overclocking. default leedroid kernel =/ is bad?
why htc desire on quadrant have 500? and nexus 2.2 have 1300???
Code:
private static string Post(string url, string data)
{
System.Net.WebRequest request1 = WebRequest.Create(url);
request1.Method = "POST";
request1.ContentType = "application/json";
byte[] byteData = Encoding.UTF8.GetBytes(data);
request1.ContentLength = byteData.Length;
using (Stream s = request1.GetRequestStream())
{
s.Write(byteData, 0, byteData.Length);
s.Close();
}
string replyData;
using (HttpWebResponse response = (HttpWebResponse)request1.GetResponse())
{
using (Stream dataStream = response.GetResponseStream())
{
using (StreamReader reader = new StreamReader(dataStream))
{
replyData = reader.ReadToEnd();
}
}
}
I am receiving an error on [request1.ContentLength] and using (Stream s = request1.GetRequestStream())
pls i really need assistance on this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Features:
ION
Slub(default)
Vanilla adreno drivers
Fixes by faux
synced with common 3.0
UV/OV
OC up to 2Ghz
Bugs:
None, yet
NOTES:
This is the stock kernel for my cm builds
It may not work on flinny builds because of new drivers
Download:
- discontinued -
Changelog:
Code:
[COLOR=DarkRed]*OT: date format-> DD/MM/YY*[/COLOR]
*See gitorious for a full changelog*
[B]03/01/14
[/B]Based on desire HD kernel
Add required changes for saga
source clean up
Credits:
Flinny- Help with my first compile
Andromadus TM- the kernel
thewadegeek- Help with some compile errors
Christopher83- (http://forum.xda-developers.com/showthread.php?p=36677987)
Fraux123- His works and fixes
engelmarkus- USB OTG(http://forum.xda-developers.com/showthread.php?t=1887073)
Billauer- frandom
mrg666- his github
Nia Xia- uksm
android kernel tm- his 3.0 common github
Alex Shi- rwsem writer lock-stealing
Shaky156 - 2d-core OC
Mustaavalkosta - the kernel
paul - ION fixes
Discontinued kernels
These kernels are no longer updated!
CM10 Android 4.1.2 kernel:
Working on: CM10 - CM10.1 build 16<
Sources_zip
Sources_github (maybe i messed up the sources,so the zip is recommed)
CM10.1 Android 4.2.2 kernel:
Features:
Only experimental (=)
Compiled with latest custom linaro cortex a8 4.8.2 13.10 by Christopher83
sync with Andromadus: Aug 24 2013
Gov: dyn interactive, interactive 3.4, conservative, ondemand, userspace, powersave, performance
Sched: noop, deadline, row 3.4, cfq, bfq
Overclock CPU up to 2.0Ghz (=)
Overclock GPU 2d-core( Shaky156) @245Mhz (=)
ext4 optimizations
Ultra KMS
SWAP from linux 3.2.x
SLUB allocator(default) from linux 3.5.7
dynamic file sync 1.2 (=)
UnderVolt / OverVolt
vmstat, MM, shmem updated to linux 3.4
enabled power collapse to save battery
Removed almost any debug message to improve the performances
USB OTG (=)
dualshock 3 support (=)
Power saving when the wifi is off
FauxSound Control
More RAM
Dev\frandom
android logger, uhid and lowmemkiller from linux 3.10
*Many other changes not mentioned here*
Bugs:
Same as Stock Andromadus
USB otg: usb sticks need a special usb hub(you can find some info here)
cfq can cause reboots(I will work on this when i have more free time)
Changelog:
Code:
[COLOR=DarkRed][U][B]*See github for a full changelog, some changes have been removed from here to make the changelog shorter*[/B][/U][/COLOR]
[B]02/10[/B]
Restore the old ondemand gov. The new one was a bit laggy
Revert a tweak, there are no improvements
[B]29/09[/B]
3.0.97
sync with kernel common 3.0
some optimizations(see github)
update interactive
update ondemand to google 3.4(test)
Logger interface - Enable and disable the logger on android. Go to /sys/kernel/logger_mode.
update memory hotplug to linux 3.9
update dyn file sync
[B]24/08[/B]
3.0.93
sync with Andromadus
sync with kernel common 3.0
update ROW
[B]27/07[/B]
clean up the gpu oc code, 2d-core is really working now
update Interactive
[B]25/07[/B]
3.0.87
compiled with linaro 4.8.2 1307 cortex-a8 optimized thanks to Christopher83 with some optimization flags
Update 2d OC ( Shaky156)
ksm from linux 3.6.x
Some optimizations(see github)
Dyn file sync 1.2
Fix stability with custom linaro 4.8.2
Some updates from linux 3.10
Update ROW
remove smartassH3
What i forgot..
[B]09/07[/B]
sync with Andromadus
3.0.85
compiled with linaro 4.8.1 1305 cortex-a8 optimized thanks to [URL="http://forum.xda-developers.com/member.php?u=4825437"]Christopher83[/URL] with some optimization flags
Ultra KSM
calibration, lowmemkiller from linux 3.10
Overclock GPU (350Mhz 3d, 2d is also oced)
remove lz4 support
otg "working" again
vmalloc from linux 3.7
mm: loads of updates from linux 3.1.x/3.2.x/3.4.x (see github)
slab, slob, slub from linux 3.5.7
some general clean up
some fixes and optimizations(see github)
dyn readahed
latest interactive from caf 3.4
remove ondemanx, intellidemand and sio(sched)
some updates from 3.0 android common
rwsem from linux 3.9 + writer lock-stealing
block: updates and optimizations
update row sched to caf 3.4
sparse irq
heap randomization
dualshock 3 support
lighter kernel
[B]23/05[/B]
sync with Andromadus
3.0.79
linaro 4.8.1 cortex-a8 optimized thanks to [URL="http://forum.xda-developers.com/member.php?u=4825437"]Christopher83[/URL]
idle pm support (+ battery saving when screen is off)
dyn file sync 1.1
less debug msgs
fauxsound control tpa
disabled ntfs and cifs
lowmemkiller from linux 3.9
android logger from linux 3.10-rc1
dev\frandom
android binder updates
backport uhid from linux 3.10-rc1
disabled zRam(you can use turboBoost instead :) )
[B]10/04[/B]
sync with Andromadus
3.0.72
Added LZ4/LZ4HC kernel compression(disabled for now, the zImage cannot be flashed)
Now LZO kernel compression(Hope it will help the reboot a bit)
No debug msges for the camera
[B]04/04[/B]
sync with Andromadus
3.0.71
Added a tweak that [U]should[/U] help to save some RAM
[B]08/03[/B]
sync with Andromadus
3.0.68
added more freqs
added 1.9Ghz and 2.0Ghz (exp)
Overvolt up to 1600
compiled with linaro 13/02
[B]25/02[/B]
sync with Andromadus
3.0.66
tweaked bfq
prevent a possible crash on suspend/resume event
[B]17/02[/B]
sync with Andromadus
3.0.64
power saving when the wifi is off
[B]05/02[/B]
Sync with andromadus
3.0.62
USB OTG enabled and working(Only experimental)
NTFS r/w(Only experimental)
CIFS(Only experimental)
New Gov. SmartassH3
a few improvements(see github for a full changelog)
[B]18/01[/B]
sync with andromadus
linux 3.0.59
updated the android logger to linux 3.8
new voltage for 1.2Ghz (test) - 1.2 should not be higher than 1.3
more robust compaction
less modules
minor changes
[B]13/01[/B]
added ck1 and dynamic file sync
OverVolt up to 1550
Download:
see attachment(without 43)
CM10.2 Android 4.3.1 kernel:
Features: see cm10.1 kernel
Changelog:
Code:
[COLOR=DarkRed]*See github for a full changelog*[/COLOR]
[COLOR=Black]06/11
[/COLOR]
Code:
[COLOR=DarkGreen][COLOR=DarkGreen][COLOR=Black]3.0.101
selinux for android 4.3x[/COLOR][/COLOR][/COLOR]
Download:
see attachment(with 43)
Sources and How to compile
Sources:
AndromadusModCM10
AndromadusMod CM10.1-CM10.2
AndromadusMod CM11.0
Useful links:
Build your first kernel-xda
Changelog Linux kernel 3.0.y
If you are looking for a toolchain:
linaro toolchain by Christopher83
Code:
/*
* Your warranty is now void.*
* I am not responsible for bricked devices, broken hearts,
* thermonuclear war, you getting fired because the alarm app failed, or
* unfulfilled sexual partners. Please do some research if you have any
* concerns about features included in this kernel before flashing it! YOU are
* choosing to install it! * Backup your system and boot partitions,
* in case your phone blows up in your face because your phone
* cant handle the speed :).
*/
freq_table:
Code:
[B][COLOR=DarkRed]CLOCK[/COLOR][/B] [B][COLOR=DarkRed] VOLTAGES[/COLOR][/B]
{ 0, 24576, LPXO, 0, 0, 30720000, 800, VDD_RAW(800) },
{ 0, 61440, PLL_3, 5, 11, 61440000, 800, VDD_RAW(800) },
{ 0, 122880, PLL_3, 5, 5, 61440000, 800, VDD_RAW(800) },
{ 0, 184320, PLL_3, 5, 4, 61440000, 800, VDD_RAW(800) },
{ 0, MAX_AXI_KHZ, AXI, 1, 0, 61440000, 800, VDD_RAW(800) },
{ 1, 245760, PLL_3, 5, 2, 61440000, 800, VDD_RAW(800) },
{ 1, 368640, PLL_3, 5, 1, 122800000, 800, VDD_RAW(800) },
{ 1, 544000, PLL_2, 3, 0, 122800000, 900, VDD_RAW(900), &pll2_tbl[0] },
{ 1, 600000, PLL_2, 3, 0, 122800000, 925, VDD_RAW(925), &pll2_tbl[1] },
{ 1, 768000, PLL_1, 2, 0, 153600000, 950, VDD_RAW(950) },
{ 1, 806400, PLL_2, 3, 0, 192000000, 1025, VDD_RAW(1025), &pll2_tbl[2]},
{ 1, 921600, PLL_2, 3, 0, 192000000, 1050, VDD_RAW(1050), &pll2_tbl[3]},
{ 1, 1024000, PLL_2, 3, 0, 192000000, 1050, VDD_RAW(1050), &pll2_tbl[4]},
{ 1, 1200000, PLL_2, 3, 0, 192000000, 1100, VDD_RAW(1100), &pll2_tbl[6]},
{ 1, 1305600, PLL_2, 3, 0, 192000000, 1125, VDD_RAW(1125), &pll2_tbl[7]},
{ 1, 1401600, PLL_2, 3, 0, 192000000, 1200, VDD_RAW(1200), &pll2_tbl[8]},
{ 1, 1516800, PLL_2, 3, 0, 192000000, 1250, VDD_RAW(1250), &pll2_tbl[10]},
{ 1, 1612800, PLL_2, 3, 0, 192000000, 1350, VDD_RAW(1350), &pll2_tbl[11]},
{ 1, 1708800, PLL_2, 3, 0, 192000000, 1350, VDD_RAW(1350), &pll2_tbl[12]},
{ 1, 1804800, PLL_2, 3, 0, 192000000, 1400, VDD_RAW(1400), &pll2_tbl[13]},
{ 1, 1920000, PLL_2, 3, 0, 192000000, 1450, VDD_RAW(1450), &pll2_tbl[14]},
{ 1, 2016000, PLL_2, 3, 0, 192000000, 1500, VDD_RAW(1500), &pll2_tbl[15]},
Great work there!!!
Any plans for CM10.1??
And hope you could add smartassv2 govener
finally u have made a thread, thanks for the hard work :beer:
Sent from my supercharged tank
---------- Post added at 10:50 PM ---------- Previous post was at 10:47 PM ----------
Allen Hu said:
Great work there!!!
Any plans for CM10.1??
And hope you could add smartassv2 govener
Click to expand...
Click to collapse
this is for cm10.1
Sent from my supercharged tank
u should rename the title to [CM10.1]
anazhd said:
u should rename the title to [CM10.1]
Click to expand...
Click to collapse
yep, a problem with the title
edit;just flashed it, everything seems working fine. Will report if there is any problem. kylon, why not release the source code so everyone can work with this together and make it a better kernel., as a community :beer:
Sent from my supercharged tank
are you going to try to add MDDI support to the kernel?
giel123 said:
are you going to try to add MDDI support to the kernel?
Click to expand...
Click to collapse
EDIT:
there s no need to ask to flinny ._.
i need a file from your phone ( Config.gz )
you can find it in proc\
you need a root file manager
kylon said:
EDIT:
there s no need to ask to flinny ._.
i need a file from your phone ( Config.gz )
you can find it in proc\
you need a root file manager
Click to expand...
Click to collapse
Here is the config.gz from my phone with non-sony panel. I am using the stock rooted ROM.
https://www.dropbox.com/s/2ib5cezv7wjvue3/config.gz
hi kylon, I have a problem. my phone froze after I had a restore from titanium backup. sorry no dmsg and logcat for u as I am out of town now. I have to remove my battery to solve this. Hope u can look into this..
Sent from my supercharged tank
Con i install this on cm10?
Inviato dal mio Desire S
you are great! ;D
nice to see this.
going to install latest cm10.1 build by flinny and then flash this.
maybe it gives it some more epicness
hisname said:
hi kylon, I have a problem. my phone froze after I had a restore from titanium backup. sorry no dmsg and logcat for u as I am out of town now. I have to remove my battery to solve this. Hope u can look into this..
Sent from my supercharged tank
Click to expand...
Click to collapse
Overclock and uv?
Please can you post the MD5 sum?
Sent from my Desire S using xda app-developers app
---------- Post added at 07:57 PM ---------- Previous post was at 07:21 PM ----------
Work on miui zero
Sent from my Desire S using xda app-developers app
kylon said:
Overclock and uv?
Click to expand...
Click to collapse
200-1200mghz.no uv, kernel supports that? with Performance governor. SIO scheduler
Sent from my supercharged tank
Last night I have same random reboot with antutu benchmark and a little loop in normal use.. The benchmark score are 4961.. I love this kernel..
Sent from my Desire S using xda app-developers app
hisname said:
200-1200mghz.no uv, kernel supports that? with Performance governor. SIO scheduler
Sent from my supercharged tank
Click to expand...
Click to collapse
this kernel was born because i needed the uv to save battery
so, yes
and the kernel is already uved(just a little) because the stock kernel uses high voltages
alfredino85 said:
Last night I have same random reboot with antutu benchmark and a little loop in normal use.. The benchmark score are 4961.. I love this kernel..
Sent from my Desire S using xda app-developers app
Click to expand...
Click to collapse
with the next relase there will be 2 versions, stable and exp
the exp version is the one we are already using
the stable version will not have some of the experimental features,like the dynamic file sync, that can cause ramdon reboots in some cases
anyway,if this can help, this is my current cpu configuration:
screen on: dynInteractive / row 1300 / 368
screen off: powersave / row 768 / 245
i had no reboots till now (my phone usage is not heavy, but i can play bo zombies which is the heaviest game for us)
@alfredino
4900 is the minium score
i did 5200
remember you to kill all the background apps
kylon said:
this kernel was born because i needed the uv to save battery
so, yes
and the kernel is already uved(just a little) because the stock kernel uses high voltages
with the next relase there will be 2 versions, stable and exp
the exp version is the one we are already using
the stable version will not have some of the experimental features,like the dynamic file sync, that can cause ramdon reboots in some cases
anyway,if this can help, this is my current cpu configuration:
screen on: dynInteractive / row 1300 / 368
screen off: powersave / row 768 / 245
i had no reboots till now (my phone usage is not heavy, but i can play bo zombies which is the heaviest game for us)
@alfredino
4900 is the minium score
i did 5200
remember you to kill all the background apps
Click to expand...
Click to collapse
what is dynamic file sync? Google search bought me no results
Sent from my supercharged tank
faux123 said:
The dynamic sync control interface uses Android kernel's unique early suspend / lat resume interface.
While screen is on, file sync is disabled.
when screen is off, a file sync is called to flush all outstanding writes and restore file sync operation as normal.
Click to expand...
Click to collapse
File synchronization (or syncing) in computing is the process of ensuring that computer files in two or more locations are updated via certain rules.
In one-way file synchronization, also called mirroring, updated files are copied from a 'source' location to one or more 'target' locations, but no files are copied back to the source location. In two-way file synchronization, updated files are copied in both directions, usually with the purpose of keeping the two locations identical to each other. In this article, the term synchronization refers exclusively to two-way file synchronization.
disabling it when screen is on, we have a performance improvement
As I receive numerous questions and suggestions concerning the custom drawing tool JavaScript interface of LectureNotes and how to implement specific drawing tools, I thought that it might be helpful to collect codes here, which should allow to easily copy them. Please feel invited to post additional ones!
To start, a simple dashed line with longer dashing
Code:
width = LN.getWidth();
height = LN.getHeight();
size = Math.min(width, height);
strokewidth = LN.getStrokeWidth();
dashing1 = 0.01 * size;
dashing2 = (LN.getStrokeCap() == 1) ? dashing1 : dashing1 + 2 * strokewidth;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
LN.setDashing(dashing1, dashing2);
LN.drawLine(x1, y1, x2, y2);
or a dashed line for which the dashing is not fixed but depends on pencil width
Code:
strokewidth = LN.getStrokeWidth();
dashing1 = 10 * strokewidth;
dashing2 = (LN.getStrokeCap() == 1) ? dashing1 : dashing1 + 2 * strokewidth;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
LN.setDashing(dashing1, dashing2);
LN.drawLine(x1, y1, x2, y2);
I dont know how to go about creating these tools, and sadly, at the moment I dont actually have the time to invest in learning any of it. So hopefully, someone here can help.
I'd like to create three drawing tools which are similar to existing ones
The tools I could use are:
-Therefore. As in, ==> Right now there are tools for arrows, I'd pretty must just like two horizontal lines instead of one.
-If and only if. As in, <==>. Right now there are tools for two headed arrow lines. Again, pretty must the same as that but two horizontal lines.
-Coordinate System, but with the addition of preplaced labels for each axis. That is, when giving it things like y min and y max, would it also be possible to have it ask for a text field for labels? So that label would show up, and scale with the rest of it?
If anyone who can tell me what to do, or better yet, provide the code for it, that would be great.
@mmcnulty: Double-lined arrows will come with the next update.
Concerning coordinate system: Text variables are presently not supported, one could only have an integer variable that then maps on a text.
Here's a script that draws an n-gon centered at the centre of the chosen rectangle and extending all the way across its shortest side. It takes 2 parameters: the number of sides and the angle (in degrees) at which the first point should be positioned (see the attached image for details).
Code:
width = LN.getWidth();
height = LN.getHeight();
pi = 3.1415927;
sides = LN.getParameter(1);
phi = LN.getParameter(2)*2*pi/360;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
x0 = (x1+x2)/2;
y0 = (y1+y2)/2;
r = Math.min(x0-x1,y0-y1);
t = LN.getStrokeWidth();
LN.setStrokeWidth(3*t);
LN.drawPoint(x0, y0);
for (i=1 ; i<=sides ; i++){
LN.drawPoint(x0+r*Math.cos(2*pi*i/sides+phi),y0-r*Math.sin(2*pi*i/sides+phi));
}
LN.setStrokeWidth(t);
for (i=1 ; i<=sides ; i++){
LN.drawLine(x0+r*Math.cos(2*pi*i/sides+phi),y0-r*Math.sin(2*pi*i/sides+phi), x0+r*Math.cos(2*pi*(i+1)/sides+phi),y0-r*Math.sin(2*pi*(i+1)/sides+phi));
}
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
While creating the script I noticed that any error that would cause the script to fail (forgotten ; or any other bad syntax) would break that particular tool until LN was restarted. The rectangular area could still be chosen, but nothing would be drawn inside it. It took me a while to figure this out. At first I thought I had the wrong idea about either the scale or the axis orientation which caused the image to lie outside the bounded area. Just thought I should mention it in case someone else has the same problem. If you are sure your code should work, try restarting.
Here's another script. This one draws a rainbow coloured pie chart with up to 6 groups of data. Each parameter can take values between 0 and 100, so you can either enter the absolute numbers (if <100 for each group) or percentages. If you don't need all 6 you can set the extras to 0.
Code:
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
x0 = (x1+x2)/2;
y0 = (y1+y2)/2;
r = Math.min(x0-x1,y0-y1);
q1 = LN.getParameter(1);
q2 = LN.getParameter(2);
q3 = LN.getParameter(3);
q4 = LN.getParameter(4);
q5 = LN.getParameter(5);
q6 = LN.getParameter(6);
s = q1+q2+q3+q4+q5+q6;
pi = 3.1415927;
phi1 = 2*pi*q1/s;
phi2 = 2*pi*(q1+q2)/s;
phi3 = 2*pi*(q1+q2+q3)/s;
phi4 = 2*pi*(q1+q2+q3+q4)/s;
phi5 = 2*pi*(q1+q2+q3+q4+q5)/s;
phi6 = 2*pi;
LN.setColor(1,0,0);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,0,-phi1);
LN.setColor(1,0.5,0);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,-phi1,-phi2+phi1);
LN.setColor(1,1,0);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,-phi2,-phi3+phi2);
LN.setColor(0,1,0);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,-phi3,-phi4+phi3);
LN.setColor(0,0,1);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,-phi4,-phi5+phi4);
LN.setColor(1,0,1);
LN.setAlpha(0.3);
LN.drawFilledArc(x0,y0,r,-phi5,-phi6+phi5);
LN.setAlpha(1);
LN.setColor(0,0,0);
LN.drawCircle(x0,y0,r);
LN.drawLine(x0,y0,x0+r,y0);
LN.drawLine(x0,y0,x0+r*Math.cos(phi1),y0-r*Math.sin(phi1));
LN.drawLine(x0,y0,x0+r*Math.cos(phi2),y0-r*Math.sin(phi2));
LN.drawLine(x0,y0,x0+r*Math.cos(phi3),y0-r*Math.sin(phi3));
LN.drawLine(x0,y0,x0+r*Math.cos(phi4),y0-r*Math.sin(phi4));
LN.drawLine(x0,y0,x0+r*Math.cos(phi5),y0-r*Math.sin(phi5));
And one more. This one draws the pie chart in monochrome. The colour used to fill the area is the same as the colour of the currently active pencil. Opacity is inversely proportional to the square root of the percentage, so smaller areas are more opaque and larger areas are less opaque (giving the impression that the same amount of colour is spread over areas of different sizes).
Code:
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
x0 = (x1+x2)/2;
y0 = (y1+y2)/2;
r = Math.min(x0-x1,y0-y1);
q1 = LN.getParameter(1);
q2 = LN.getParameter(2);
q3 = LN.getParameter(3);
q4 = LN.getParameter(4);
q5 = LN.getParameter(5);
q6 = LN.getParameter(6);
s = q1+q2+q3+q4+q5+q6;
pi = 3.1415927;
phi1 = 2*pi*q1/s;
phi2 = 2*pi*(q1+q2)/s;
phi3 = 2*pi*(q1+q2+q3)/s;
phi4 = 2*pi*(q1+q2+q3+q4)/s;
phi5 = 2*pi*(q1+q2+q3+q4+q5)/s;
phi6 = 2*pi;
LN.setAlpha(1-Math.sqrt(q1/s));
LN.drawFilledArc(x0,y0,r,0,-phi1);
LN.setAlpha(1-Math.sqrt(q2/s));
LN.drawFilledArc(x0,y0,r,-phi1,-phi2+phi1);
LN.setAlpha(1-Math.sqrt(q3/s));
LN.drawFilledArc(x0,y0,r,-phi2,-phi3+phi2);
LN.setAlpha(1-Math.sqrt(q4/s));
LN.drawFilledArc(x0,y0,r,-phi3,-phi4+phi3);
LN.setAlpha(1-Math.sqrt(q5/s));
LN.drawFilledArc(x0,y0,r,-phi4,-phi5+phi4);
LN.setAlpha(1-Math.sqrt(q6/s));
LN.drawFilledArc(x0,y0,r,-phi5,-phi6+phi5);
LN.setAlpha(1);
LN.setColor(0,0,0);
LN.drawCircle(x0,y0,r);
LN.drawLine(x0,y0,x0+r,y0);
LN.drawLine(x0,y0,x0+r*Math.cos(phi1),y0-r*Math.sin(phi1));
LN.drawLine(x0,y0,x0+r*Math.cos(phi2),y0-r*Math.sin(phi2));
LN.drawLine(x0,y0,x0+r*Math.cos(phi3),y0-r*Math.sin(phi3));
LN.drawLine(x0,y0,x0+r*Math.cos(phi4),y0-r*Math.sin(phi4));
LN.drawLine(x0,y0,x0+r*Math.cos(phi5),y0-r*Math.sin(phi5));
Sent from my GT-N8010 using Tapatalk
A couple of scripts for people who, like me, draw graphs first and the marks the axes later The axes are drawn in black and the colour of the "curve" is the same as the currently selected pen.
You can see that the graphs are made up of a lot of dots if the y-axis is much taller than the x-axis, but I kinda like the effect
Bell curve (no parameters):
Code:
strokewidth = LN.getStrokeWidth();
head = 5*strokewidth;
open = 0.4;
headcos = head * Math.cos(open);
headsin = head * Math.sin(open);
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
red = LN.getRed();
green = LN.getGreen();
blue = LN.getBlue();
xmin = Math.min(x1, x2);
ymin = Math.min(y1, y2);
xmax = Math.max(x1, x2);
ymax = Math.max(y1, y2);
xavail = Math.max(0, xmax - xmin - headsin - 2 * headcos);
yavail = Math.max(0, ymax - ymin - headsin - 2 * headcos);
xorigin = headsin;
yorigin = headsin;
LN.setColor(0,0,0);
LN.drawLine((xmin + xmax)/2, ymin + headcos, (xmin + xmax)/2 , ymax);
LN.drawFilledTriangle( (xmin + xmax)/2 - headsin, ymin + headcos, (xmin + xmax)/2 , ymin, (xmin + xmax)/2 + headsin, ymin + headcos);
a = 0.8*(ymax-ymin);
b = (xmin + xmax)/2;
c = 0.8*(1/6)*(xmax-xmin);
d = ymax-yorigin;
LN.setStrokeWidth(1.2*strokewidth);
n = Math.floor((xmax-xmin)/2);
LN.setColor(red,green,blue);
for (i=0 ; i<=n-5 ; i++){
LN.drawPoint(b+i, -a*Math.exp(-i*i/(2*c*c))+d);
LN.drawPoint(b-i, -a*Math.exp(-i*i/(2*c*c))+d);
}
LN.setStrokeWidth(strokewidth);
LN.setColor(0,0,0);
LN.drawLine(xmin, ymax - yorigin, xmax - headcos, ymax - yorigin);
LN.drawFilledTriangle(xmax - headcos, ymax - yorigin + headsin, xmax, ymax - yorigin, xmax - headcos, ymax - yorigin - headsin);
Quadratic parabola (again, no parameters):
Code:
strokewidth = LN.getStrokeWidth();
head = 5*strokewidth;
open = 0.4;
headcos = head * Math.cos(open);
headsin = head * Math.sin(open);
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
red = LN.getRed();
green = LN.getGreen();
blue = LN.getBlue();
xmin = Math.min(x1, x2);
ymin = Math.min(y1, y2);
xmax = Math.max(x1, x2);
ymax = Math.max(y1, y2);
xavail = Math.max(0, xmax - xmin - headsin - 2 * headcos);
yavail = Math.max(0, ymax - ymin - headsin - 2 * headcos);
xorigin = headsin;
yorigin = headsin;
LN.setColor(0,0,0);
LN.drawLine(xmin, ymax - yorigin, xmax - headcos, ymax - yorigin);
LN.drawLine((xmin + xmax)/2, ymin + headcos, (xmin + xmax)/2 , ymax);
LN.drawFilledTriangle(xmax - headcos, ymax - yorigin + headsin, xmax, ymax - yorigin, xmax - headcos, ymax - yorigin - headsin);
LN.drawFilledTriangle( (xmin + xmax)/2 - headsin, ymin + headcos, (xmin + xmax)/2 , ymin, (xmin + xmax)/2 + headsin, ymin + headcos);
a = 4*(ymax-ymin);
b = (xmin + xmax)/2;
d = ymax-yorigin;
LN.setStrokeWidth(1.2*strokewidth);
n = Math.floor((xmax-xmin)/2);
c = (xmax-xmin);
LN.setColor(red,green,blue);
for (i=0 ; i<=n ; i++){
LN.drawPoint(b+i,-a*(i/c)*(i/c)+d);
LN.drawPoint(b-i,-a*(i/c)*(i/c)+d);
}
LN.setStrokeWidth(strokewidth);
And the final ones for today, these two scripts compute the probabilities for two well-known discrete probability distributions and draw a schematic representation.
Poisson: parameters are lambda = the expected value (and arbitrary positive real number) and k = the maximum value for which P(X=i) should be calculated and ploted (a positive integer).
Code:
strokewidth = LN.getStrokeWidth();
head = 5*strokewidth;
open = 0.4;
headcos = head * Math.cos(open);
headsin = head * Math.sin(open);
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
red = LN.getRed();
green = LN.getGreen();
blue = LN.getBlue();
xmin = Math.min(x1, x2);
ymin = Math.min(y1, y2);
xmax = Math.max(x1, x2);
ymax = Math.max(y1, y2);
xavail = Math.max(0, xmax - xmin - headsin - 2 * headcos);
yavail = Math.max(0, ymax - ymin - headsin - 2 * headcos);
xorigin = headsin;
yorigin = headsin;
l = LN.getParameter(1);
k = LN.getParameter(2);
a = 0.9*(ymax-ymin);
b = xmin + xorigin;
d = ymax-yorigin;
n = (xmax-xmin)*0.9/k;
c = (xmax-xmin);
LN.setStrokeWidth(3*strokewidth);
fac = 1;
for (i=1; i<=k ; i++){
fac = fac*i;
LN.drawLine(b+i*n,d-strokewidth,b+i*n,-a*(Math.pow(l,i)*Math.exp(-l)/fac)+d+strokewidth);
}
LN.setStrokeWidth(strokewidth);
LN.setColor(0,0,0);
LN.drawLine(xmin+xorigin, ymin + headcos, xmin +xorigin , ymax);
LN.drawFilledTriangle(xmax - headcos, ymax - yorigin + headsin, xmax, ymax - yorigin, xmax - headcos, ymax - yorigin - headsin);
LN.drawFilledTriangle( xmin + xorigin - headsin, ymin + headcos, xmin + xorigin , ymin, xmin + xorigin + headsin, ymin + headcos);
LN.setStrokeWidth(3*strokewidth);
LN.setColor(red,green,blue);
LN.drawLine(b,d-strokewidth,b,-a*Math.exp(-l)+d+strokewidth);
LN.drawPoint(b,d-a);
LN.setColor(0,0,0);
LN.setTextSize(16);
LN.drawText(1,b+10,d-a+6);
LN.drawText(Math.exp(-l),(xmin+xmax)/2,-a+d+6);
fac = 1;
for (i=1; i<=k ; i++){
fac = fac*i;
LN.drawText(Math.pow(l,i)*Math.exp(-l)/fac,(xmin+xmax)/2,-a+d+6+18*i);
}
LN.setStrokeWidth(strokewidth);
LN.drawLine(xmin, ymax - yorigin, xmax - headcos, ymax - yorigin);
Geometric: parameters are p = the probability of a certain event occuring in one trial (a real between 0 and 1) and k = the maximum value for which P(X=i) should be calculated and ploted (a positive integer).
Code:
strokewidth = LN.getStrokeWidth();
head = 5*strokewidth;
open = 0.4;
headcos = head * Math.cos(open);
headsin = head * Math.sin(open);
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
red = LN.getRed();
green = LN.getGreen();
blue = LN.getBlue();
xmin = Math.min(x1, x2);
ymin = Math.min(y1, y2);
xmax = Math.max(x1, x2);
ymax = Math.max(y1, y2);
xavail = Math.max(0, xmax - xmin - headsin - 2 * headcos);
yavail = Math.max(0, ymax - ymin - headsin - 2 * headcos);
xorigin = headsin;
yorigin = headsin;
p = LN.getParameter(1);
k = LN.getParameter(2);
q = 1-p;
a = 0.9*(ymax-ymin);
b = xmin + xorigin;
d = ymax-yorigin;
n = (xmax-xmin)*0.9/k;
c = (xmax-xmin);
LN.setStrokeWidth(3*strokewidth);
for (i=1; i<=k ; i++){
LN.drawLine(b+i*n,d-strokewidth,b+i*n,-a*p*Math.pow(q,i)+d+strokewidth);
}
LN.setStrokeWidth(strokewidth);
LN.setColor(0,0,0);
LN.drawLine(xmin+xorigin, ymin + headcos, xmin +xorigin , ymax);
LN.drawFilledTriangle(xmax - headcos, ymax - yorigin + headsin, xmax, ymax - yorigin, xmax - headcos, ymax - yorigin - headsin);
LN.drawFilledTriangle( xmin + xorigin - headsin, ymin + headcos, xmin + xorigin , ymin, xmin + xorigin + headsin, ymin + headcos);
LN.setStrokeWidth(3*strokewidth);
LN.setColor(red,green,blue);
LN.drawLine(b,d-strokewidth,b,-a*p+d+strokewidth);
LN.drawPoint(b,d-a);
LN.setColor(0,0,0);
LN.setTextSize(16);
LN.drawText(1,b+10,d-a+6);
for (i=0; i<=k ; i++){
LN.drawText(p*Math.pow(q,i),(xmin+xmax)/2,-a+d+6+18*i);
}
LN.setStrokeWidth(strokewidth);
LN.drawLine(xmin, ymax - yorigin, xmax - headcos, ymax - yorigin);
A code snippet
Here is my code for a bar graph. Some of the code is based on the standard examples from Acadoid.
It can have up to 6 bars (I guess more could be added). Error checking is limited so follow the following rules:
If you only want 3 bars, enter the first 3 numbers. For the 4th and beyond only use -1. Example:
First: 20
Second: 30
Third: 50
Fourth: -1
Fifth: -1
Sixth: -1
Works but...
First: 20
Second: 30
Third: 50
Fourth: -1
Fifth: -1
Sixth: 30
Doesn't Work as planned since my code makes assumptions.
I have included a picture which show this in action along with some other stuff I will post.
Enjoy!
Code:
width = LN.getWidth();
height = LN.getHeight();
total = 0;
var colours = new Array();
colours[1]= new Array();
colours[1][1]=1;
colours[1][2]=0;
colours[1][3]=0;
colours[2]= new Array();
colours[2][1]=0;
colours[2][2]=0;
colours[2][3]=1;
colours[3]= new Array();
colours[3][1]=0;
colours[3][2]=1;
colours[3][3]=0;
colours[4]= new Array();
colours[4][1]=1;
colours[4][2]=0;
colours[4][3]=1;
colours[5]= new Array();
colours[5][1]=1;
colours[5][2]=1;
colours[5][3]=0;
colours[6]= new Array();
colours[6][1]=0;
colours[6][2]=1;
colours[6][3]=1;
var parameterList=new Array();
totalParams=0;
maxValue=0;
x1 = LN.getX1()+3;
y1 = LN.getY1()+3;
x2 = LN.getX2()-3;
y2 = LN.getY2()-3;
for(i = 1; i <= 6; i++) {
parameterList[i] = LN.getParameter(i);
if (parameterList[i] > maxValue) {
maxValue= parameterList[i];
}
if (parameterList[i] >= 0) {
totalParams+=1;
total += parameterList[i];
}
}
curPos=0;
barWidth= Math.abs(x2-x1)/totalParams;
for(i = 1; i <= totalParams; i++) {
LN.setColor(colours[i][1], colours[i][2], colours[i][3]);
LN.drawFilledRect(x1+curPos, y2, x1+curPos+barWidth, y2-Math.abs(y2-y1)*(parameterList[i]/maxValue));
curPos += barWidth;
}
LN.setColor();
LN.drawLine(x1, y1-3, x1, y2+3);
LN.drawLine(x1-3, y2, x2+3, y2);
curPos=0;
for(i = 1; i <= totalParams; i++) {
LN.drawRect(x1+curPos, y2, x1+curPos+barWidth, y2-Math.abs(y2-y1)*(parameterList[i]/maxValue));
LN.drawLine( x1+curPos+barWidth , y2, x1+curPos+barWidth , y2+3);
curPos += barWidth;
}
List bullets
Here is the code for the bullets seen in my previous post. The snap-to-grid code was stolen from the included examples.
Code:
width = LN.getWidth();
scale = LN.getScale ();
step = width / 150 + scale * width / 25;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2() - 10;
y2 = LN.getY2() - 10;
x1g = Math.floor((x1 - (step / 2)) / step + 0.5) * step;
y1g = Math.floor((y1 - (step / 2)) / step + 0.5) * step;
x2g = Math.floor((x2 - (step / 2)) / step + 0.5) * step;
y2g = Math.floor((y2 - (step / 2)) / step + 0.5) * step;
tall = scale * 14;
wide = tall * 2;
LN.setClip(x2g - tall, y2g- tall, x2g + wide, y2g + tall);
LN.drawLine(x2g, y2g, x2g - tall, y2g - tall);
LN.drawLine(x2g, y2g, x2g - tall, y2g + tall);
LN.drawLine(x2g - tall, y2g -tall, x2g + wide, y2g);
LN.drawLine(x2g - tall, y2g + tall, x2g + wide, y2g);
---------- Post added at 04:07 PM ---------- Previous post was at 04:03 PM ----------
And the check boxes. More code borrowing here...
Code:
width = LN.getWidth();
scale = LN.getScale ();
step = width / 150 + scale * width / 25;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2() - 10;
y2 = LN.getY2() - 10;
x1g = Math.floor((x1 - (step / 2)) / step + 0.5) * step;
y1g = Math.floor((y1 - (step / 2)) / step + 0.5) * step;
x2g = Math.floor((x2 - (step / 2)) / step + 0.5) * step;
y2g = Math.floor((y2 - (step / 2)) / step + 0.5) * step;
tall = scale * 12;
wide = tall * 2;
LN.setClip( x2g - wide/2, y2g - wide/2, x2g+ wide/2, y2g + wide/2 );
LN.drawRect(x2g - wide/2, y2g - wide/2, x2g+ wide/2, y2g + wide/2);
---------- Post added at 04:12 PM ---------- Previous post was at 04:07 PM ----------
Enjoy and if anyone has a request I am sure someone might help you out... myself included.
Star:
Code:
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
pi = 3.14159;
r = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
xmin = x1 - r;
ymin = y1 - r;
xmax = x1 + r;
ymax = y1 + r;
scaler = r;
c1 = scaler * (Math.sqrt (5)-1) / 4;
c2 = scaler * (Math.sqrt (5)+1) / 4;
s1 = scaler * Math.sqrt (10 + 2 * Math.sqrt (5)) / 4;
s2 = scaler * Math.sqrt (10 - 2 * Math.sqrt (5)) / 4;
LN.setClip(xmin, ymin, xmax, ymax);
LN.drawLine(x1 + scaler, y1, x1 - c2, y1 + s2);
LN.drawLine(x1 + scaler, y1, x1 - c2, y1 - s2);
LN.drawLine(x1 - c2, y1 + s2, x1 + c1, y1 - s1);
LN.drawLine(x1 - c2, y1 - s2, x1 + c1, y1 + s1);
LN.drawLine(x1 + c1, y1 + s1, x1 + c1, y1 - s1);
Happy face:
Code:
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
r = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
xmin = x1 - r;
ymin = y1 - r;
xmax = x1 + r;
ymax = y1 + r;
eye = 1+ r/ 12;
LN.setClip(xmin, ymin, xmax, ymax);
LN.drawOval(x1, y1, r, r);
LN.drawFilledOval(x1 + r/ 3, y1 - r/3, eye, eye);
LN.drawFilledOval(x1 - r/ 3, y1 - r/3, eye, eye);
LN.drawArc(x1, y1, r / 1.8, 0, 3.14);
@acadoid: Any chance we will be able to use more than 6 parameters in the future? I'm planning on making a script that takes your sample and returns its average and sample standard deviation. If it were possible to go up to at least 10 parameters that would be great.
Fat arrows
This one draws a large, hollow arrow, using acadoid's snap-to-grid code:
Code:
width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
step = width / 150 + scale * width / 25;
x1 = LN.getX1();
y1 = LN.getY1();
x2 = LN.getX2();
y2 = LN.getY2();
x1g = (step / 2) + Math.floor((x1 - (step / 2)) / step + 0.5) * step;
y1g = (step / 2) + Math.floor((y1 - (step / 2)) / step + 0.5) * step;
x2g = (step / 2) + Math.floor((x2 - (step / 2)) / step + 0.5) * step;
y2g = (step / 2) + Math.floor((y2 - (step / 2)) / step + 0.5) * step;
arrowLength=Math.sqrt((x2g-x1g)*(x2g-x1g)+(y2g-y1g)*(y2g-y1g));
theta=Math.atan((y2g-y1g)/(x2g-x1g));
if (x2g>=x1g) {
xa=-0.2* arrowLength*Math.sin(theta)+x1g;
ya=0.2*arrowLength*Math.cos(theta)+y1g;
xb=0.2* arrowLength*Math.sin(theta)+x1g;
yb=-0.2*arrowLength*Math.cos(theta)+y1g;
xc=0.6*arrowLength*Math.cos(theta)+0.2* arrowLength*Math.sin(theta)+x1g;
yc=0.6*arrowLength*Math.sin(theta)-0.2*arrowLength*Math.cos(theta)+y1g;
xd=0.6*arrowLength*Math.cos(theta)+0.4* arrowLength*Math.sin(theta)+x1g;
yd=0.6*arrowLength*Math.sin(theta)-0.4*arrowLength*Math.cos(theta)+y1g;
xe=arrowLength*Math.cos(theta)+x1g;
ye=arrowLength*Math.sin(theta)+y1g;
xf=0.6*arrowLength*Math.cos(theta)-0.4* arrowLength*Math.sin(theta)+x1g;
yf=0.6*arrowLength*Math.sin(theta)+0.4*arrowLength*Math.cos(theta)+y1g;
xg=0.6*arrowLength*Math.cos(theta)-0.2* arrowLength*Math.sin(theta)+x1g;
yg=0.6*arrowLength*Math.sin(theta)+0.2*arrowLength*Math.cos(theta)+y1g;
}
else {
xa=x1g-(-0.2* arrowLength*Math.sin(theta));
ya=y1g-(0.2*arrowLength*Math.cos(theta));
xb=x1g-(0.2* arrowLength*Math.sin(theta));
yb=y1g-(-0.2*arrowLength*Math.cos(theta));
xc=x1g-(0.6*arrowLength*Math.cos(theta)+0.2* arrowLength*Math.sin(theta));
yc=y1g-(0.6*arrowLength*Math.sin(theta)-0.2*arrowLength*Math.cos(theta));
xd=x1g-(0.6*arrowLength*Math.cos(theta)+0.4* arrowLength*Math.sin(theta));
yd=y1g-(0.6*arrowLength*Math.sin(theta)-0.4*arrowLength*Math.cos(theta));
xe=x1g-(arrowLength*Math.cos(theta));
ye=y1g-(arrowLength*Math.sin(theta));
xf=x1g-(0.6*arrowLength*Math.cos(theta)-0.4* arrowLength*Math.sin(theta));
yf=y1g-(0.6*arrowLength*Math.sin(theta)+0.4*arrowLength*Math.cos(theta));
xg=x1g-(0.6*arrowLength*Math.cos(theta)-0.2* arrowLength*Math.sin(theta));
yg=y1g-(0.6*arrowLength*Math.sin(theta)+0.2*arrowLength*Math.cos(theta));
}
xmin = Math.min(xa, xb, xc, xd, xe, xf, xg);
ymin = Math.min(ya, yb, yc, yd, ye, yf, yg);
xmax = Math.max(xa, xb, xc, xd, xe, xf, xg);
ymax = Math.max(ya, yb, yc, yd, ye, yf, yg);
LN.setClip(xmin, ymin, xmax, ymax);
LN.drawLine(xa, ya, xb, yb);
LN.drawLine(xc, yc, xb, yb);
LN.drawLine(xc, yc, xd, yd);
LN.drawLine(xe, ye, xd, yd);
LN.drawLine(xe, ye, xf, yf);
LN.drawLine(xf, yf, xg, yg);
LN.drawLine(xg, yg, xa, ya);
@Tintinnuntius & Canguy247: Many thanks for posting the codes!
@Tintinnuntius: I actually thought that nobody would use all six parameters... More parameters can be added, I will increase the maximal number to ten. Anticipating your question: There has to be a maximal number of parameters due to the Android dialog resources.
Many thanks and a request/suggestion
First I want to say THANK-YOU to acadoid for this wonderful addition. It has surpassed my expectations.
Next, I would like to make a suggestion. These tools open the possibility for libraries (which I think You were considering in the other thread). My suggestion is to adjust the interface to allow 2 libraries to be loaded at a time with a simple dropdown or arrows to switch between installed libraries. That would allow someone to load a library, which can be customized by picking tools from other libraries, which does all of the most comkon things they need such as bullets and boxes. They could then have the second library which they can switch depending on their task. This way we could build libraries of schematic symbols for electronics, or flowchart symbols, or pukps and valves and the user could switch depending on their use at the time.
Also, it would be great if the custom tools were represented by pictures instead of numbers, but I see the difficulty in making this practical.
Finally, is it possible to have a small status bar as part of the floating tool widget which tells the user what tool/library is selected?
And thanks again!
Canguy247 said:
Also, it would be great if the custom tools were represented by pictures instead of numbers, but I see the difficulty in making this practical.
Click to expand...
Click to collapse
How about at least replacing numbers by a 2-letter code (that would still fit in the small window and be easily legible). The code is something one could specify while scripting the tool (just an extra input next to the box that lets you name the tool) and it would be easier to remember. For example:
- T for a table,
- Pn for a polygon on n vertices,
- sd for a tool that calculates the standard deviation of given data,
- ...
instead of
- 1 for a table,
- 13 for a polygon on n vertices,
- 5 for a tool that calculates the standard deviation of given data,
- ...
The toolbox would then look like a tiny periodic table
@Canguy247: You are not the first to suggest container/groups/libraries for custom drawing tools. I have that on my to-do-list.
I am also considering to allow small icons. The problem is not the icons of the custom drawing tools that LectureNotes ships with, but the custom drawing tools that users define. Note that there is also a drawing tools menu in which you can select drawing tools and custom drawing tools by name.
@Tintinnuntius: Letters or double-letters might be an option, but I guess that a small icon is better, isn't it?
acadoid said:
@Tintinnuntius: Letters or double-letters might be an option, but I guess that a small icon is better, isn't it?
Click to expand...
Click to collapse
An icon is better, of course. Would we be able to design and import our own? Or even better, just cut it from LN notebook.
@Tintinnuntius: The question of how to handle the icons is what makes adding these icons a bit complicated.
acadoid said:
@Tintinnuntius: The question of how to handle the icons is what makes adding these icons a bit complicated.
Click to expand...
Click to collapse
I don't know if this would work or not, but could you just develop an algorithm to use the javascript code for each tool to generate the icons for that tool automatically?
I've come across a funny bug in the pencil toolbox. If both the standard and custom tools are shown, the numbers for custom tools are nice and thin, but if the standard tools are removed, the numbers for custom tools get all fat