Some minor improvements ;) January 03, 2010, 11:30:19 pm I made some small improvement to the 170 branch and I would like to share it with you guys- backspace.patch deletes also the character instead of just going back one position.- pinout.patch add a global trigger ( '$' ) to display the (current) pinout. I was getting tired of looking this up constantly. I used the colorscheme of the probe kit seeed is selling.- dvm.patch add a global trigger ( 'D' ) (only works on an active mode) to constantly monitor the voltage on the ADC pin. Press any key to exit this mode. Perhaps it should move to a seperate module like the AUX pin?I want to extent the voltmeasure to be more precise but it is sufficient for Vcc measurement Please provide some feedback (please be gentle ) Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #1 – January 04, 2010, 08:50:26 am Great work. If you explicitly release the patches under Creative Commons 0 (public domain) I'll integrate them. Leave a post (or send me a PM) that says:I, (real name), release this code under the Create Commons 0 license. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #2 – January 04, 2010, 10:57:59 am Ian, you got a PM. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #3 – January 04, 2010, 11:03:01 am Thanks! I'll integrate these into the nightly soon. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #4 – January 04, 2010, 10:40:22 pm Before you apply it to the nightly build I got a improvement for the dvm.patch I improved the accurasy of the volt displaying a bit. It now displays an extra digit:Code: [Select]1-WIRE>WPOWER SUPPLIES ON1-WIRE>iBus Pirate v3Firmware 3v3-nightly (SVN 175 BS+PO+DVM2)DEVID:0x0447 REVID:0x3043 (B5)http://dangerousprototypes.com*----------*POWER SUPPLIES ONVoltage monitors: 5V: 5.05 | 3.3V: 3.35 | VPULLUP: 5.05 |a/A/@ controls AUX pinOpen drain outputs (H=Hi-Z, L=GND)Pull-up resistors OFFBitorder configuration not allowed*----------*1-WIRE>It should be ok because the ADC is 10bit and the max voltage is 6V6 (2* 3V3), so 1 bit is 0V006. I could display another extra digit, but i think is gives a false sense of extra accurasy. (i remember some math lessons about significance of digits, but very vague ). Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #5 – January 15, 2010, 06:00:00 pm Backspace--I kind of like the non-destructive back-space because I can change just one character at the beginning of syntax and still see what needs to be retyped. This is really part of a larger terminal problem though. I've always wanted to add arrow key control so up and down scroll through the previous X (10? dynamic?) commands, and left/right step through the characters.I'll leave it up to public comment if we implement a destructive backspace now, but I see it as part of this larger vt100 emulation terminal improvement.Pinout ---I like the pinout, but I'd rather not use it. That's a lot of text that takes up space we could use to add more features. IT is very handy to have in the terminal, and I really want it, but it comes with a very hefty price.Continuous ADC reading---Yes, great, put it in. d/D is already read, will be be confusing to make it case sensitive now? Maybe send a string of back spaces instead of repeating the UARTTX 5 times?Improved accuracy----Between the reference and resistor divider does an additional decimal point matter? For the probe I can see how it's nice. Let's implement this and see how it works out.Other stuff---These are all great ideas, do you have any other suggestions? I'm interested in improving the command prompt, and I'd like to improve on the message storage system now that I have a better handle on pointers in C30. I also think the stk500v2 programmer can be implemented as a mode now, it only takes a bit of space. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #6 – January 15, 2010, 06:22:02 pm I like the destructive backspace (I work a lot with console bases things and they all implement this) I was also looking into the command message loop and i think it is a bit bloated (dunno why you did use two loops: the general one and a specific one for the mode. I think they can be combined which also saves a bit of space) destructive backspace could be a user selectable feature?I agree with you on the pinout, perhaps make it a selectable option during the build?The continuous voltage option is perhaps only handy in HiZ mode (or a special mode perhaps??) and the 'occasional' one is perhaps only usefull in the other modes. Sending 5 times backspace is indeed a waste of code space (just as the BPBR() macro, which can be easily replaced with bpWline('') or perhaps a better one (must take a look at the genarated asm)Wheter the improved accurasy makes sense depends on the accurasy of the supply voltage and used resistors. As a side note most digital multimeter got an error of 2% and +- 1 digit. I got btw plenty of idea's but à haven';t got much time today (beertime ) Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #7 – January 15, 2010, 06:26:35 pm Yeah, me too. Also: a confirmation when resetting or jumping to bootloader might be nice. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #8 – January 15, 2010, 11:03:02 pm up arrow support would be good I always want to re-type my 1-wire read, and even though there are macros there are still about 19 characters to get right.Backspace - not sure as long as left/right arrow works otherwise their value (in my mind) disappears a bit, they are there but you have no way to use them except retype. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #9 – January 16, 2010, 12:12:47 am @Ian: I did prepare the changes to the ADC, but i didn''t see the changes you described in the other topic (jump to bootloader) so I didn't commit the changes. However you use the command '/' for it which is also the command for setting the clock high. Is this ok? Im still have trouble understanding the programflow Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #10 – January 16, 2010, 09:05:15 am I used , / sets the clock high. I forgot to check in the source last night, it's done now.The basic program flow is:1. Grab user input in a loop (main.c, binUI.c)2. Check if there's a single character and it's a menu command (procMenu.c), if not3. Process the user input as syntax (procSyntax.c) and pass it to the protocol library (through the switch in BusPirateCore.c) one command at a time. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #11 – January 16, 2010, 09:06:19 am Yikes, it is the command to set the clock low, though I'll change it to | maybe? Something that requires the user to press shift first. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #12 – January 16, 2010, 09:23:46 am I changed bootloader command to *, but maybe $ is better because it's next to the reset command. I don't see another use for $, but * might be useful in the future. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #13 – January 16, 2010, 10:03:07 am I don't want to oofend you, but shouldn't the userinput handling be in one place (.c/sub) instead of two? then it is easier (I think) to add commands (and see if a token is already used)[pseudocode]:Code: [Select]void main(){ while(1){ pressed_enter=0;while(!pressed_enter){ c=uartrx; if(c!=enter)cmd[pointer++]=c; else presed_enter=1;} procces_cmd(cmd);}}proced_cmd(cmd){ while(cmd[p]) switch (cmd[p++]) case '/': protocol.clock_hi(); break case'i': printinfo(); break; case'r': protol.read(&cmd[p]); etcetc}}[/pseudocode]it is a bit of pointerhell, but it is all in one sub. It also allows multiple commands typed at once (i like to have also 'm 2[enter]' instead of 'm[enter]2[enter]')I haven't looked very deep into this and it is just an alpha thought. I realize you wrote it from scratch some time ago and built mulitple things into it and against it, so i don't have the overview.btw: $ or * are both fine. Last Edit: January 01, 1970, 01:00:00 am by Guest
Re: Some minor improvements ;) Reply #14 – January 16, 2010, 10:17:48 am Don't worry about it. I like working with you and I think it would be fun to tear it apart and make it better based on the current use. The code grew entirely organically as I needed something new I added it, so there's tons of room for improvement.The menu and syntax handlers are in separate places because they started out in the same code file but it became absolutely huge and hard to deal with, so I broke it up into smaller bits.Multiple commands require special consideration because some menus and syntax are shared, for example B is baud, but it is also a binary number as 0b, etc. Last Edit: January 01, 1970, 01:00:00 am by Guest