Auto custom

This is where developers can exchange ideas and ask questions relevant to the DM42 firmware.

Please note that Swiss Micros staff are unable to provide answers here as a general rule. This is intended as a community-driven forum.
Post Reply
ljubo
Posts: 8
Joined: Sat Jun 20, 2020 1:46 pm

Auto custom

Post by ljubo » Tue Jul 14, 2020 12:39 am

CUSTOM menu behaviour makes sense for HP-42s but not for DM42 with its dedicated custom keys (F-Buttons). In addition, functions assigned to DM42 F-Buttons (top row) are not frequently used - at least I'm not using them frequently :D

I wanted a persistent custom menu, so, I have slightly changed Free42 code to enter custom menu automatically.
Custom menu becomes practically the system ground state and can't be exited with some exceptions:
  1. Shift-CUSTOM activates default DM42 F-Button functionality
  2. In the Prgm mode Exit will exit custom menu - makes easy to access up and down arrows
  3. Entering other menus will of course exit Custom menu
The implementation is kind of hack. I tried first to implement it cleanly and make Custom the root menu of the system, however, the state machine of Free42 is quite complicated, and the state without menus is not a menu itself making such implementation not simple.

Attached is the patch file with the source code based on Free42 2.5.16

You can download compiled firmware file with this link:
https://drive.google.com/file/d/1TUnXbR ... sp=sharing
As usual, use it on your own risk :mrgreen: - see LICENCE and COPYING files.
Attachments
auto_custom_patch.zip
(909 Bytes) Downloaded 11 times
Last edited by ljubo on Mon Aug 17, 2020 10:52 pm, edited 2 times in total.

User avatar
pica
Posts: 39
Joined: Fri Mar 30, 2018 11:36 am
Location: eSwatini

Re: Auto custom

Post by pica » Sun Aug 16, 2020 4:59 pm

Hi Ijubo

I very much like your idea of making the custom menu the default.
However, I do not know how to implement a patch file. :-o . I only know to program HP calculators and bash scripts.
What must I do to actually get the patch to work on my DM42?

ljubo
Posts: 8
Joined: Sat Jun 20, 2020 1:46 pm

Re: Auto custom

Post by ljubo » Sun Aug 16, 2020 11:50 pm

Hmm - I have a compiled firmware file that is running on my DM42 - however, I can't post it in the forum or send it via private message (file too large). I will need to find a way to distribute the file...

rprosperi
Posts: 888
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Auto custom

Post by rprosperi » Mon Aug 17, 2020 3:12 am

Suggestion: Use one of the free file sharing services such as OneDrive, Google-Drive, DropBox, etc. to host the file, then share the file and post a link to that file here in the Forum.
--bob p

DM42: β00071 & 00282, DM41X: β00071, DM10L: 071/100

User avatar
pica
Posts: 39
Joined: Fri Mar 30, 2018 11:36 am
Location: eSwatini

Re: Auto custom

Post by pica » Mon Aug 17, 2020 10:41 am

A link to a file in dropbox, google drive, etc would be great!

In the meantime, here is a link to a folder on my google drive, which anyone can edit.
Maybe you can drop the file there. After a while, I will only give it viewing permission.

https://drive.google.com/drive/folders/ ... sp=sharing

ljubo
Posts: 8
Joined: Sat Jun 20, 2020 1:46 pm

Re: Auto custom

Post by ljubo » Mon Aug 17, 2020 10:50 pm

I like the idea with the Google drive - you should be able to access the compiled firmware file with the following link:

https://drive.google.com/file/d/1TUnXbR ... sp=sharing

As usual, use it on your own risk :mrgreen: (see LICENSE and COPYING file) - that said - the firmware runs on my DM42 without any problems.

Please share your experiences - at least for me it increases DM42 value quite a lot - would be good to get this funtionality into the official firmware at some point...

User avatar
pica
Posts: 39
Joined: Fri Mar 30, 2018 11:36 am
Location: eSwatini

Re: Auto custom

Post by pica » Tue Aug 18, 2020 10:57 am

This is superb.
I have been trying to make a key-map, so far without success, to make the unused f3 key go to the custom menu with a single keypress, but this is much better! Thank-you so much. :P

So far no problem, but I will post if any issue comes up.

User avatar
pica
Posts: 39
Joined: Fri Mar 30, 2018 11:36 am
Location: eSwatini

Re: Auto custom

Post by pica » Tue Aug 18, 2020 1:56 pm

OK, so a downside is that SST and BST no longer work when testing a program, without pushing shift for each step.
The workaround is to use up two assignments in the custom menu for SST and BST.
That works fine, and the assignments do not have to use the valuable "front face" assignments of the custom menu.

Still worth it.

ljubo
Posts: 8
Joined: Sat Jun 20, 2020 1:46 pm

Re: Auto custom

Post by ljubo » Tue Aug 18, 2020 6:28 pm

I’m not programming DM42 so much, so I haven’t spotted the inconvenience with SST and BST.

A possibility could be to make “CUSTOM” a toggle - means, one could switch off custom menu more „permanently“. However, one would need to exit Custom menu with pressing „CUSTOM“ again (and not with Exit) in a case one would like to use custom functions during programming, and also, that would waste function keys again - so, I‘m not sure if toggle would be a good solution.

Assigning sst and bst to F-keys if one use them frequently seems to me like the best way anyway. Any other ideas how to improve behavior?

User avatar
pica
Posts: 39
Joined: Fri Mar 30, 2018 11:36 am
Location: eSwatini

Re: Auto custom

Post by pica » Wed Aug 19, 2020 5:08 pm

Another almost cosmetic issue, is that when the EXIT key is held down, there is a bit of random information displayed, rather than the usual keypress feedback. But this is of no real consequence.

Post Reply