51st-Vfw / DCSWaypointEditor

51st VFW fork of the DCS Waypoint Editor. Works with DCS-BIOS to allow waypoints and other setup to be injected into the jet via clickable cockpit controls.
GNU General Public License v3.0
6 stars 0 forks source link

Harrier Driver.py update #27

Closed DarKFeneR996 closed 2 years ago

DarKFeneR996 commented 2 years ago

in drivers.py

replace to

class HarrierDriver(Driver):
def enter_coords(self, latlong, elev):
    lat_str, lon_str = latlon_tostring(latlong, decimal_minutes_mode=False, easting_zfill=3)
    self.logger.debug(f"Entering coords string: {lat_str}, {lon_str}")

    if latlong.lat.degree > 0:
        self.ufc("2", delay_release=self.medium_delay)
    else:
        self.ufc("8", delay_release=self.medium_delay)
    self.enter_number(lat_str)

    #self.odu("2") No more needed. Switches between Lat/Lon by pushing "Enter"

    if latlong.lon.degree > 0:
        self.ufc("6", delay_release=self.medium_delay)
    else:
        self.ufc("4", delay_release=self.medium_delay)

    self.enter_number(lon_str)

    #self.odu("2") No more needed. Switches between Lat/Lon by pushing "Enter"

    if elev:
        self.odu("3")
        self.enter_number(elev)

    ```


Note: edited 
ilominar commented 2 years ago

Near as I can tell, the only functional issue this patch addresses is removing the "ODU 2" presses from the sequence in enter_coords() as they are no longer necessary and break data entry? ​Is that correct?

This patch as presented also removes the progress indication from the UI, drops an elevation clamp, and makes several stylistic changes to the original implementation? I would prefer not to make those changes without some clear motivation as to why they are important.

Thanks.

DarKFeneR996 commented 2 years ago

Duplicate of #

Near as I can tell, the only functional issue this patch addresses is removing the "ODU 2" presses from the sequence in enter_coords() as they are no longer necessary and break data entry? ​Is that correct?

This patch as presented also removes the progress indication from the UI, drops an elevation clamp, and makes several stylistic changes to the original implementation? I would prefer not to make those changes without some clear motivation as to why they are important.

Thanks.

Harrier does not needs to ODU 2 after ENTER push button. After ENTER, it automatically switch between Lat-Lon (if is in Lat, after ENTER push, it switches to Lon, and then Lon to Lat)

I'm sorry for some others changes, I could accidentally edited a old version (maybe the original from Santi), not the actual

ilominar commented 2 years ago

No worries, just wanted to make sure there wasn't something else broken that wasn't obvious (like the progress UI doesn't work on the Harrier) as I don't fly that module.

I'll push a 1.5.1 release in the next day or two with the two ODU 2 pushes removed.

Thanks for the bug report.

DarKFeneR996 commented 2 years ago

I will be more active for the harrier. I think I'll make a request for CAS page implementation.

Thx to you for replying me

ilominar commented 2 years ago

Should be fixed v1.5.1.