Saturday 22 October 2016

[Intellij] Configure Go to Implementation with CNTRL+ Left Click

This is not available out of the box, We need to configure this with Quicklists and keymap  
  1. Preferences/Settings-> Appearance & Behavior ->  "Quick Lists" 
  2. Give a name and save it.
  3. Add an action in the right side panel bottom (Click on the + at the bottom)
  4. Add the Go to Declaration action (Main Menu > Navigate > Declaration )
  5. Add the Go to Declaration action (Main Menu > Navigate > Implementation )
  6. Click Apply
  7. Go to Keymap in the settings
  8. "Quick List" -> Add a shortcut with (COMMAND/CNTRL+Click)
  9. If it is already assigned to something, do the needful.
Then you can try the shortcut

Friday 29 July 2016

[Solution] How to embed images from dropbox in blogger

When we try to embed images uploaded in dropbox in your blog, when composing with Blogger.com.

Your public link will not work. As your link may look as below -

INCORRECT : https://www.dropbox.com/s/fbgl0r024v4vmbd/Android%20N%20Error.png?dl=0

This is not a actual link instead an embedded page. To resolve this  you postfix ?raw=1 in your URL and the problem will be resolved.

The new URL looks as below

CORRECT : https://www.dropbox.com/s/fbgl0r024v4vmbd/Android%20N%20Error.png?raw=1

Happy Blogging !!

[Android Studio] Solution : Android N requires the IDE to be running with JDK 1.8


Android N Requires the IDE To be running with Java 1.8 or later. Install a supported JDK.

Eventhough we install the JDK 1.8, this error comes up, and we are not able to work on Design view of a Mobile Phone.






Solution to the Problem :

Found a solution here http://stackoverflow.com/questions/35928580/android-n-requires-the-ide-to-be-running-with-java-1-8-or-later/35935433#35935433


  • Quit Android Studio
  • Edit the file /Applications/Android\ Studio.app/Contents/Info.plist
  • remove the versions and change it to 1.8
  • The changes in my file looks as below
      <key>JVMVersion</key>
      <string>1.8</string>

  • Restart Android Studio.

Now the problem will be resolved in the Design view of the Activity View


Wednesday 15 June 2016

Run Pinned Shortcut in Taskbar as Administrator in Windows

Luckily you can set Run as administrator option from the shortcut in this case.
  1. Right-click the shortcut in your task bar.
  2. Right-click the program's name (say Command prompt for instance)
  3. Click on Properties.
  4. Click the Shortcut tab.
  5. Click the Advanced... ...
  6. Check the Run as administrator check box.
  7. Click the OK button.

Monday 6 July 2015

[MCU] Microcontroller Packaging

QFN : Quad Flat No Leads:

These connect IC's to PCB's without through-holes.
The figure shows with lead frame and wire bonding. Flat no-lead packages include an exposed thermal pad to improve heat transfer out of the IC (into the PCB).  Hand soldering is not possible with this package




QFP: Quad Flat Package

A surface mounted IC, pins extending for all the 4 sides.  Socketing such packages is rare and through-hole mounting is not possible.




LQFP: Low Profile Quad Flat Package (1.4mm)



TQFP: Thin Quad Flat Package (1.0 mm) 

Has shorter leads than the LQFP. To be used in a space constrained designs.
Helps in solving increased board density.

References

https://en.wikipedia.org/wiki/Quad_Flat_No-leads_package
https://en.wikipedia.org/wiki/Quad_Flat_Package


Friday 12 June 2015

[Exploring Freescale MCU Programming] #5 RTC (Real time clock) set and Time and alarm

#2 -  next one in my pipeline is Realtime Clock (RTC) initialize and get it working.

What is RTC?


real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers,servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time.

RTC in K20D Freescale Board


The Real Time Clock (RTC) module on the K20 has two modes of operation, system power‐up and system power‐ down. In system power‐up mode, the RTC may be powered by either the MCU regulator or the backup power supply, VBAT. During system power‐down, the RTC is only powered from the backup power supply, VBAT


I have used RTC with a FRDM-K20D50 Board to schedule an alarm at regular intervals.



The CPU Settings should enable the RTC Oscillator. Otherwise RTC will not work.




RTC Component added.



Setting Properties for the RTC Component



Now lets add the code to set the RTC time and get it back, the main.c


Code to set and get time

printf("--Test init--\n");
LDD_RTC_TTime ttime;
ttime.Day = 11;
ttime.Month = 06;
ttime.Year = 2015;
ttime.Hour = 17;
ttime.Minute = 45;
ttime.Second = 15;

RTC1_SetTime(NULL, &ttime);


int i;
for(i=1;i<=3000000;i++)
{

}

LDD_RTC_TTime ttime1;
RTC1_GetTime(NULL, &ttime1);

printf("%d-%d-%d %d:%d:%d\n", ttime1.Day, ttime1.Month, ttime1.Year, ttime1.Hour, ttime1.Minute, ttime1.Second);



Output

--Test init--
11-6-2015 17:45:16


- Printed the RTC time that is set

Lets try setting RTC alarm and triggering it

Enable the methods setAlarm and enable onAlarm Event and generate code



main.c

ttime1.Second += 30;

RTC1_SetAlarm(NULL, &ttime);

Event.c

void RTC1_OnAlarm(LDD_TUserData *UserDataPtr)
{
printf("---Alarm Triggered--\n");
LDD_RTC_TTime ttime1;
RTC1_GetTime(NULL, &ttime1);

printf("%d-%d-%d %d:%d:%d\n", ttime1.Day, ttime1.Month, ttime1.Year,
ttime1.Hour, ttime1.Minute, ttime1.Second);

}


Output after alarm


---Alarm Triggered--
11-6-2015 17:45:26


Project:


Wednesday 20 May 2015

[Codewarrior 10.6 Solution] printf(%f) Does not work

printf("-Value %f\n", floatValue) -   prints -Value %f as such, instead of the float value in the console.

Solution :  Change a project settings

Project   ->   Properties  ->  C/C++  Build  ->  Settings  ->  Tool Settings Tab ->  Librarian  -> 

Change print formats  to int_FP