Big thumbs up to Bill Stacey for FezTerm

I’ve been working on a research project using some FEZ Dominos this semester. After we did a few rounds of testing the last few nights with the students it became apparent that we needed a way to more easily send commands to the FEZ rather than changing the code between each test. Even though changing the code is easy on a FEZ it is better to be able to type a command and get an immediate response from the board.

I grabbed FezTerm yesterday and played with it for about 10 minutes and was able to get it integrated into our application this morning very quickly. I still need to plumb in all the commands but it is about 90% of what we needed right out of the box.

I just wanted to give a big thumbs up to Bill for coming up with it and then being so kind as to share it.

You can find FezTerm here: [quote]http://microframeworkprojects.com/index.php?title=FezTerm[/quote]

Hey thanks. Good news. :slight_smile:

I made one small modification…

        string[] lcmd = cmd.ToLower().Split(' ');
        switch (lcmd[0])
        {
            case "exit":
                return "bye";

This lets you pass arguments to commands! In may case I wanted to be able to tell my FEZ to turn on certain things for testing so now I can just type in:

trigger set0

and I get a replay if that set was found.

Yes is a very useful projects. We should extend it even further.

+1. Did same in vNext of project - NetMFShell here.
http://youtu.be/W5wzE9cvdZo

With some more code, you can turn your fez into powerful little command processor like DOS or Powershell only limited by the size and number of commands you can fit on it. Let your freak flag fly!

Awsome!

Hey Bill here is another small improvement.

        private void tbCmd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Up)
            {
                this.tbCmd.Text = this.previousCmd + " ";
                this.tbCmd.SelectionStart = this.tbCmd.Text.Length;
            }
        }

It moves the cursor to the end of the command line when you use the up arrow key. I had to add a space character to the end of the line or the cursor would only go to the second to the last character (even tried using Length+1).

Updated URL: http://wiki.tinyclr.com/index.php?title=FezTerm

Anyone have any idea on why the extra space has to added? This seems counter to every example you can find on the subject (but it works :slight_smile: ).

It is your up key moves the cursor down the road. Set e.Handled to “true”:


        private void tbCmd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Up)
            {
                this.tbCmd.Text = this.previousCmd;
                
                this.tbCmd.SelectionStart = this.tbCmd.TextLength;

                e.Handled = true;
            }
        }

Awsome! I knew there had to be a good reason but could not figure out what.

Thanks!