Skittles Posted March 16, 2007 Report Posted March 16, 2007 Hello Mr. Dowson, I'm back with another GFdisplay question and I've read through other posts that you haven't dealt with it in a while, but I'm going to ask anyway :lol: I have a GF-46 under my monitor solely as a heading display and here's what I have programmed into GFDisplay.ini [GF46.0]NEEDS=B E A D0= ="HDG " D1= X02CC F64 ;Aircraft Heading It's working like it should. But, you know me, I have to make things difficult for you. :) The heading shows as a three digit integer aligned to the right side of the display in the last three of the six positions. As shown here ___340 I would like to have the numbers aligned to the left or even better start in the second position. As shown here 340___ or _340__ I've gone through the PDF and don't find any reference to "aligning" numbers. Is this something worth your time adding? I did find one minor issue with the documentation. It's in the Appendix, you have a section Dxxxx: Numerical display format; but not for the Rn display formats. Just thought I'd let you know. Thank you for your time and effort, Joe
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 D1= X02CC F64 ;Aircraft Heading It's working like it should. But, you know me, I have to make things difficult for you. :) The heading shows as a three digit integer aligned to the right side of the display in the last three of the six positions. As shown here ___340 Hmmm. Wonder how. Reading my doc again it seems like there should be a formating code, like D30 or similar? Maybe I resort to a default. I would like to have the numbers aligned to the left or even better start in the second position. From reading the document I don't think that's possible. Is this something worth your time adding? Well, I'd be concerned about adding new bugs, as the code is now a couple of years old and doesn't look familiar to me at all. Also, I'm not using any GF display devices at all it isn't possible to test changes here either. Maybe the Dxxxx parameter needs an extra optional value: D-Xifs where s is the number of spaces to be left after the value (i+f+s must of course be less than or equal to the capacity of the display, or one less for signed numbers). If you want to risk new bugs I could try adding code for this, but you'd have to do all the testing. I did find one minor issue with the documentation. It's in the Appendix, you have a section Dxxxx: Numerical display format; but not for the Rn display formats. Thanks. I've reproduced the earlier explanation in the Appendix, so if I ever do make a new release it will be okay. Regards Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 First of all, thank you so much for entertaining my ideas. So, The aircraft's actual heading is 241.5688 So that I make sure I understand this formatter: DXifs i = number of numbers displayed BEFORE the decimal f = number of numbers displayed AFTER the decimal s = Number of spaces AFTER displayed decimal numbers with the new version, here is what I get... Code / Result D1= X02CC F64 D0 / ___242 D1= X02CC F64 D1 / __41.6_ D1= X02CC F64 D2 / _1.57__ D1= X02CC F64 D3 / 569___ D1= X02CC F64 D4 / Overflow It seems that the f and s numbers are being combined D1=X02CC F64 D302 / Blank This should have given _242__ Right? Three numbers before the decimal, no numbers after and two spaces. I hope this is enough info. ADDED: D1= X02CC F64 D01 / ____.6_
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 So that I make sure I understand this formatter: DXifs i = number of numbers displayed BEFORE the decimal f = number of numbers displayed AFTER the decimal s = Number of spaces AFTER displayed decimal numbers with the new version, here is what I get... Code / Result D1= X02CC F64 D0 / ___242 D1= X02CC F64 D1 / __41.6_ D1= X02CC F64 D2 / _1.57__ D1= X02CC F64 D3 / 569___ D1= X02CC F64 D4 / Overflow Maybe i'm forgetting stuff but ... ... before you had no D parameter at all (meaning what?), now you have D with one digit. Is that supposed to do something too? How do you think that is supposed to fit into the D-Xifs format? I don't understand what you intend it to mean. Just checking, yet, I do have the 100's and units digits mixed up in one place, but I'm not sure fixing that will do anything for you if you only specify one digit. What do you intend "Dn" to convey? Dn00 or D0n0 or D00n?
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 If I have a three digit whole number and I only specify D1, it still displays three numbers. I was just keeping it clean. I'm not a skilled tester. I should have mentioned, duh, Any double numbers Except D01 (added to previous post, you're too fast for me) produced a blank display (I assume GFdisplay didn't understand and ignored the line) By not specifying the D parameter, I would receive ___242.
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 If I have a three digit whole number and I only specify D1, it still displays three numbers. I was just keeping it clean. I'm not a skilled tester. Well, no versions of GFdisplay would have ever understood Dn (one digit) properly -- it isn't really valid. The - and the X were optional, but the i and f were always necessary. That's why I asked what you thought the Dn values should do. Anyway, I've decided for you. It now needs only 1 2 or 3 digits: 1 digit = i, number of integer digits. f and s assumed zero 2 digits = if, as before, s assumed zero 3 digits = ifs, the whole nine yards. Try 1.221, up replacing the attachment earlier. Regards Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 Heading now 357.5043 CODE / RESULT D1= X02CC F64 D30 / ___358 D1= X02CC F64 D31 / __357.5 D1= X02CC F64 D32 / _357.50 D1= X02CC F64 D33 / 357.504 D1= X02CC F64 D012 / _357.50 D1= X02CC F64 D101 / ___58_ D1= X02CC F64 D102 / ___8__ D1= X02CC F64 D103 / BLANK D1= X02CC F64 D301 / Overflow D1= X02CC F64 D311 / Overflow ADDED: D1= X02CC F64 D02 / ___357 D1= X02CC F64 D03 / ___357 D1= X02CC F64 D111 / __57.5_ D1= X02CC F64 D011 / __357.5
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 D1= X02CC F64 D30 / ___358 correct D1= X02CC F64 D31 / __357.5 correct D1= X02CC F64 D32 / _357.50 correct D1= X02CC F64 D33 / 357.504 correct D1= X02CC F64 D012 / _357.50 Ouch! I think I treat that as D12 at present. I see in the doc: "If the number of integer places is given as zero it is allowed to vary as needed, with preceding spaces if needed." that doesn't really mesh with this new facility. I'll need to think about that. D1= X02CC F64 D101 / ___58_ D1= X02CC F64 D102 / ___8__ D1= X02CC F64 D103 / BLANK Hmm. This looks like the value is shifting out of some space reserved for it. It must be in a separate routine. I obviously need to examine more of the code. What do you think an integer specification of "1" should do to your 358, by the way? Am I correct in assuming (and I don't remember) that the number of integer places is only a minimum, not maximum? Can you clarify? D1= X02CC F64 D301 / Overflow D1= X02CC F64 D311 / Overflow Hmm. Don't understand thosewish i could test these things here, it is very difficult this way. :-( D1= X02CC F64 D02 / ___357 D02 is the same as D2 at present. D1= X02CC F64 D03 / ___357 Same as D3 at present. D1= X02CC F64 D111 / __57.5_ correct except for lost digit by shifting (same as above), I think? D1= X02CC F64 D011 / __357.5 same as D11, so correct I think What do you think? i may need to let this lie till some time next week. I thought it looked easy to do, but no mods to old programs are ever easy, especially when you can't test it yourself. :-( Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 D1= X02CC F64 D30 / ___358 correct D1= X02CC F64 D31 / __357.5 correct D1= X02CC F64 D32 / _357.50 correct D1= X02CC F64 D33 / 357.504 correct D1= X02CC F64 D012 / _357.50 hmmm. 0 integer digits never catered for. Is that needed. This should be treated as D12 at present, but it cannot restrict the integer to 1 digit when it is > 9. so it is as expected. As stated in the manual, using a 0 for i will allow the integer to read as is. Meaning if I'm on a heading of 090, it would read 90, but in this case my heading contained three integer digit. So yes, it is as expected, I'm including these combination to figure out what's happening with the numbers. I could make D012 give "357.50__" in this case, but the problem I think is that I don't know if I can provide a "." except after a digit, so ".50__" may not be possible. Best I think to issue an error if the i digit is 0. Not sure if I know what you mean. Also there is one too many spaces after the number, it should have been 357.50_ D1= X02CC F64 D101 / ___58_ D1= X02CC F64 D102 / ___8__ D1= X02CC F64 D103 / BLANK Okay, these indicate that I am correctly shifting the number up, but whatever I am passing it to (another routine) is still expecting the same length as before, so it is losing the shifted-up digits. I'll look at that. D1= X02CC F64 D301 / Overflow D1= X02CC F64 D311 / Overflow ... but they are strange. Don't understand those. D1= X02CC F64 D02 / ___357 correct, same as D2, but there are 3 digits D1= X02CC F64 D03 / ___357 correct, same as D3. I fail to see how D02 is the same as D2, I should be getting to decimal places, right? I'll fail the last two in the next version. D1= X02CC F64 D111 / __57.5_ perfect! Perfect? I'm expecting __357.5_ Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 i may need to let this lie till some time next week. I thought it looked easy to do, but no mods to old programs are ever easy, especially when you can't test it yourself. :-(Pete Now that I understand completely, I've had a few old programs so poorly annotated, I had to start over from scratch. Please, take your time. In essence, it is doing what I need it to do, just not what I want Thank you so much for trying. Take care, Joe
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 D1= X02CC F64 D30 / ___358 correct D1= X02CC F64 D31 / __357.5 correct D1= X02CC F64 D32 / _357.50 correct D1= X02CC F64 D33 / 357.504 correct D1= X02CC F64 D012 / _357.50 hmmm. 0 integer digits never catered for. Is that needed. This should be treated as D12 at present, but it cannot restrict the integer to 1 digit when it is > 9. so it is as expected. As stated in the manual, using a 0 for i will allow the integer to read as is. Meaning if I'm on a heading of 090, it would read 90, but in this case my heading contained three integer digit. So yes, it is as expected, I'm including these combination to figure out what's happening with the numbers. I could make D012 give "357.50__" in this case, but the problem I think is that I don't know if I can provide a "." except after a digit, so ".50__" may not be possible. Best I think to issue an error if the i digit is 0. Not sure if I know what you mean. Also there is one too many spaces after the number, it should have been 357.50_ D1= X02CC F64 D101 / ___58_ D1= X02CC F64 D102 / ___8__ D1= X02CC F64 D103 / BLANK Okay, these indicate that I am correctly shifting the number up, but whatever I am passing it to (another routine) is still expecting the same length as before, so it is losing the shifted-up digits. I'll look at that. D1= X02CC F64 D301 / Overflow D1= X02CC F64 D311 / Overflow ... but they are strange. Don't understand those. D1= X02CC F64 D02 / ___357 correct, same as D2, but there are 3 digits D1= X02CC F64 D03 / ___357 correct, same as D3. I fail to see how D02 is the same as D2, I should be getting to decimal places, right? I'll fail the last two in the next version. D1= X02CC F64 D111 / __57.5_ perfect! Perfect? I'm expecting __357.5_ Pete You are replying to an earlier edit of my message, now deleted. Please read the later one. Pete
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 Please, take your time. In essence, it is doing what I need it to do, just not what I want Please check the revised reply. The unedited one, you replied to, was sent in error. I still want your comments on that. Incidentally, regarding your comment "I fail to see how D02 is the same as D2, I should be getting to decimal places, right?", the problem was that I convert the number after the D to decimal, so I get 2 for D02 (or D002 etc etc). I have to treat leading zeroes as a special case. Another problem I just noticed is that the converted value is stored in an 8-bit value (byte). Since this only has a capcity up to 255, it explains the "overflow" results for your D3nn tests. The only problem I think I have left is the disappearance of the leading digits as the values are shifted left. I just cannot see why that is happening by inspection of the code. :-( Regards Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 D1= X02CC F64 D30 / ___358 correct D1= X02CC F64 D31 / __357.5 correct D1= X02CC F64 D32 / _357.50 correct D1= X02CC F64 D33 / 357.504 correct D1= X02CC F64 D012 / _357.50 Ouch! I think I treat that as D12 at present. I see in the doc: "If the number of integer places is given as zero it is allowed to vary as needed, with preceding spaces if needed." that doesn't really mesh with this new facility. I'll need to think about that. D1= X02CC F64 D101 / ___58_ D1= X02CC F64 D102 / ___8__ D1= X02CC F64 D103 / BLANK Hmm. This looks like the value is shifting out of some space reserved for it. It must be in a separate routine. I obviously need to examine more of the code. What do you think an integer specification of "1" should do to your 358, by the way? The same as 0, display what ever numbers are needed. Am I correct in assuming (and I don't remember) that the number of integer places is only a minimum, not maximum? Can you clarify? I'm not sure if it's a min or max. If the number of integer digits is less than i, zeros proceed the integers. 5 degrees and D2 would result in 05, D4 would result in 0005. I'm using an i of 1 to show that something is wrong, it should be showing all three integer numbers since it is a three digit heading. I thought it might be useful D1= X02CC F64 D301 / Overflow D1= X02CC F64 D311 / Overflow Hmm. Don't understand thosewish i could test these things here, it is very difficult this way. :-( D1= X02CC F64 D02 / ___357 D02 is the same as D2 at present. D1= X02CC F64 D03 / ___357 Same as D3 at present. D1= X02CC F64 D111 / __57.5_ correct except for lost digit by shifting (same as above), I think? D1= X02CC F64 D011 / __357.5 same as D11, so correct I think What do you think? i may need to let this lie till some time next week. I thought it looked easy to do, but no mods to old programs are ever easy, especially when you can't test it yourself. :-( Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 The only problem I think I have left is the disappearance of the leading digits as the values are shifted left. I just cannot see why that is happening by inspection of the code. :-( When I have these problems, I print the section of code I'm having problems with, write down the variables, their types and values passed to them and go outside for a smoke and review it all. This only works of course if the program is fresh in my head. So I know how you feel.
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 Last chance todaytry 1.222 attached. Pete GFdisplay1222.zip
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 WHOO HOO!!! You're the greatest!!! Works perfectly!!! I'm so happy you were willing to put forth the time, effort and frustration. You still take donations right?
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 WHOO HOO!!! You're the greatest!!! Works perfectly!!! I'm so happy you were willing to put forth the time, effort and frustration. You still take donations right? Well, the PayPal account is still open (petedowson@btconnect.com), but mainly I pay for my hobby with FSUIPC and WideFS sales through SimMarket. Regards Pete
Skittles Posted March 16, 2007 Author Report Posted March 16, 2007 A kind payment for your service has been sent via paypal. Thanks again!
Pete Dowson Posted March 16, 2007 Report Posted March 16, 2007 A kind payment for your service has been sent via paypal. Thanks again! Hey, thank you very much! It is really appreciated! ;-) Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now