I have a big problem with SCRIPT.POL on my teletype 3.1.0 6FBA23A. Basically I can’t get it to trigger only on rising edge. Here’s what it does in each mode:

0: no triggering (as expected)
1: no triggering
2: triggering on both rising and falling edge
3: triggering on both rising and falling edge (as expected)

Anyone else with the same problem? (My teletype is just back from repairs and I put version 3.1.0 on it immediately. Hoping it’s not a hardware issue.

EDIT: turns out that this bug only shows up if you’re using DEVICE.FLIP (as I am). Flipping the screen and inputs round reverts to the usual behaviour for me.

1 Like

sorry for bringing this up again. but I fail to see how SCENE.G is an alternative. yes you can move the initialisation stuff to another scene. but you still likely want scripts as backbone for grid ops logic and effectively also loose a trigger input. just my 2c

Probably when you’re FLIPped $.POL is affecting script 8 instead. Sorry for the trouble, will work on a patch for this tonight.

1 Like

Fixed build for broken trigger inputs with DEVICE.FLIP engaged:

teletype.hex (581.2 KB - 2ef0d28 - 2019/07/11)

Here’s the PR. They really ought to add a git commit --facepalm.

6 Likes

20 chars of “Thank you :pray:

New beta: teletype.hex (584.2 KB - 6ddf2c7 - 2019/10/06)

  • FIX: broken SCRIPT.POL behavior when DEVICE.FLIPped
  • FIX: improve CV output latency
  • NEW: call metro with SCRIPT 9 or init with SCRIPT 10
  • FIX: parts of help mode had display glitches and couldn’t be read
  • NEW: search forward (C-f / C-s) or backward (C-r) in help mode
  • FIX 2019/10/06: out of bounds crash with repeated searches
21 Likes

Awesome, thanks for the fixes and new features! I’ll try this out.

its_happening.jpeg

Are the $ aliases included?

Yeah, aliases all run the same code as the longer op names.

1 Like

Thank you for the update!

Adding a search to help mode makes it much more useful!

I was just able to get it to crash with the following steps though:

  1. press alt-h to go into help mode
  2. ctrl-f and search for ‘pattern’
  3. hit enter 4 times
  4. see ‘pattern: not found’
  5. ctrl-r
  6. hit enter 4 times
1 Like

Thanks for catching this - edited the post with a fix (6ddf2c7).

1 Like

A couple of lines in the help file (I don’t recall where, just scroll down through them on Teletype and you will see it) are too long and wrap over, corrupting the text and (I think) causing some crashes for me a while back. I fixed this, added four more scripts per scene, and four more patterns in my own local branch.

1 Like

Just confirming that the checksum for your firmware update is: BE59343-DIRTY

Is this correct?

Yeah, that’s what mine shows too. Odd because that’s a couple commits ago. This is the right firmware though - search bug reported above is fixed. Must still be something mucked up with my build process.

2 Likes

Care to share your branch? :upside_down_face:

1 Like

My local files are a little messy since I’ve been deleting stuff I don’t use in a wholesale way!

But these are my notes and should get you there for the four extra scripts, have fun!

To update number of scripts

/src/state.h line 25
#define SCRIPT_COUNT XXX

/src/turtle.h line 33 and following
--> insert script(s) into the enum, they must come before metro and init

/module/edit_mode.c line 403 and following
--> insert prefix letter into exception list

/src/ops/controlflow.c line 245
    if (a > <last callable script number from turtle.h enum> || a < TT_SCRIPT_1) {

/src/ops/controlflow.c line 245
    if (a > <last callable script number from turtle.h enum> || a < TT_SCRIPT_1) {

/src/ops/controlflow.c line 274
        if (s >= TT_SCRIPT_1 && s <= <last callable script number from turtle.h enum>) {

/module/usb_disk_mode.c line 128
--> add else if case for new script and increment succeeding numbers for e.g. pattern and grid

/module/usb_disk_mode.c line 268
--> add else if case for new script and increment succeeding numbers for e.g. pattern and grid

/module/usb_disk_mode.c  about line 268
                        // SCRIPTS
                        else if (s >= 0 && s <= 13) {
--> adjust to match script count

/module/usb_disk_mode.c  about line 361
                        // PATTERNS
                        // tele_patterns[]. l wrap start end v[64]
                        else if (s == 14) {
--> adjust to agree with number of scripts plus one

/module/usb_disk_mode.c  about line 411
                        // GRID
                        else if (s == 15) {
--> adjust to be one more than the patterns index
2 Likes

This is awesome and totally in line with my plan to finally delve into some firmware hacking. Probably not a good place to start, but with this guidance…

Thank you very much!

Ah one question: was 4 dictated by available ram?
(sorry for asking without knowing any numbers, was just immediately curious… I believe additional 4 is a perfect number for my usage anyways)

1 Like

You might be able to add one more script. The compiler will complain if you run out of space.

I was able to add four more patterns too, but I haven’t tested it on the module (i.e. it compiled OK and that’s it) and I don’t have a UI to scroll sideways. I probably won’t address the UI since it suits my purposes to have some extra 64 element arrays with helper functions.

1 Like

I loaded 6ddf2c7. The new search feature is ace! The only thing I noticed around lingering display issues on the help screens is on page 3, second line from the bottom, SCENE.G has some extra pixels lit in front of it which I assume is the closing parenthesis wrapping around? Doesn’t make it unreadable or anything but in case you’re nit-picking it.

Also tested calling SCRIPT 9 and SCRIPT 10 and they seem to work exactly as expected, even with metro running. SCRIPT 9 just seems to call it an extra time without interrupting metro’s regular calls. I assume the intention here is for grid intensive projects? Do all of your grid setup in one scene, call another with SCENE.G, and have an extra 1-2 scripts for code?

Thanks for the new goodies!

2 Likes

I haven’t seen much chatter about teletype communicating with crow yet—then again I am a novice in the ways of ctrl+f. It doesnt seem like Druid has any set of instructions for communicating i2c with teletype yet.
Anyone messed with making OPs for crow yet? I’m tempted to open the hood but I am still grokking TT’s language and know it’s going to be a different world once I start messing with libavr :hammer_and_wrench: still going down the rabbit hole anyhow