Dean Camera's Micro Menu - Reprinting menu text

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings,

I can not figure out how to print the menu text again.

My goal is to use the screen for the called function. On exiting I wish to return to the menu system.

The typedef for the menu items has Next Previous etc.

How can I get the current menu id so I can reprint the current menu text?

 

I can get the system to work.  However one must know to press a navigation button in order to get back in after the called function returns.

 

Until I figure this out I am stuck using a different and inferior menu system.

Thanks

Kirk

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well after a good bit of digging I found it.

 

			case BUTTON_ENTER:
			Menu_EnterCurrentItem();
			// reprint the menu after exiting the called function
			Menu_Navigate(Menu_GetCurrentMenu());
			break;

One can not just use the CurrentMenuItem pointer as it internal to MicroMenu.c however there is a nice Menu_GetCurrentMenu() function.

 

By adding the 4th line above the problem is solved.

 

Kirk

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PS.  I wonder why a question like "how do I shift a byte?" gets tons of responses in short order.  My questions seem to just sit.  Curious.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd guess that not so many are familiar with the subject of your question. Almost everyone has an opinion about byte shifting.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

... and Dean has been busy/absent recently.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wonder why

Dean's micro menu stuff was written and was "current" the best part of 10 years ago. I doubt that there's a lot of users these days as it's sat collecting dust at the back of a project archive somewhere.

 

OTOH all programmers are doing bit shifts every day so everyone here knows all about that - it's what sets embedded micro programmers apart from those writing stock control and database apps!

 

EDIT: OK, just 8 not 10 years old - but same meat, different gravy. (who's even using a butterfly these days anyway?)

Last Edited: Tue. Nov 3, 2015 - 09:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I doubt that there's a lot of users these days

Pity.

 

It is organized so nicely.  Everything needed for a menu entry is configured on one line.  I am only using MicroMenu as a 1 D menu (only 3 buttons) but it is worth the effort.

 

The menu system that I am transitioning from has a block for functions, a block for text, a block for arrays of the above.  Writing code that works in my old system is a pain.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean does provide examples of C done well.

 

You've looked at some well done C code. Your old code is a mess and you don't like it. You know a lot more now than you did then. I bet you could sit down and write yourself a very nice menu system in a few hours.

 

The gcc compiler has some new features since then, so look into __flash and __memx as they make handling strings in flash very slick.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

You know a lot more now than you did then.

Very True

Torby wrote:
I bet you could sit down and write yourself a very nice menu system in a few hours.

Probably an exaggeration of my skills

Torby wrote:
The gcc compiler has some new features since then, so look into __flash and __memx as they make handling strings in flash very slick.

This information has my attention. Can you point me to some good reading on the topic?

Last Edited: Tue. Nov 3, 2015 - 06:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]