Add altim set + WX Report + WR R + Fix LDR Bug (ERAM)#810
Add altim set + WX Report + WR R + Fix LDR Bug (ERAM)#810jessie846 wants to merge 22 commits intommp:masterfrom
Conversation
checkandmate1
left a comment
There was a problem hiding this comment.
Nice addition! Just a few comments:
|
@checkandmate1 ALTIM Set still looks good, everything for that should be resolved. Still working on the WX |
checkandmate1
left a comment
There was a problem hiding this comment.
Some more comments, mostly minor things.
|
Done |
mmp
left a comment
There was a problem hiding this comment.
Looks good; no further comments from me and thanks for your patience with all of the feedback! Over to @checkandmate1 for anything else before it lands.
I'd generally comment that there seems to be a lot of duplicated or very similar code between the drawing code in altim.go and wx.go and that the drawing code is fairly extensive. This might be worth a future cleanup; I don't know the ERAM code super well but am curious whether what is provided in menu.go and toolbar.go might be useful for doing this more succinctly.
| // Convert 3-letter IATA to ICAO by prepending K (US convention). | ||
| icao := airport | ||
| if len(airport) == 3 { | ||
| icao = "K" + airport |
There was a problem hiding this comment.
There's an av.DB.LookupAirport method you can use here instead: it also handles trying prepending "P" and "T" if it doesn't find a "K" airport. Then this can go away and you can just do something like:
ap, ok := av.DB.LookupAirport(airport)
if !ok {
... error ...
}
icao := ap.Id
There was a problem hiding this comment.
I should add: I pushed a fix to LookupAirport just now that handles "T" airports. (Previously it was just K and P.)
| // Convert 3-letter IATA to ICAO by prepending K (US convention). | ||
| icao := airport | ||
| if len(airport) == 3 { | ||
| icao = "K" + airport |
I believe there were some extra comimts like "try add text wrapping", merge branch, and update scenario files, that are causign the issue. Those can be removed as they have nothing to do with the PR. But This PR adds the altimeter set with all the working menus, except TEMPLATE as CRC doesn't have it, so subsequently I do not know what it does.
Fixed a bug with LDR, when the user would change it an LDR is would change the global LDR, that should not happen