Coder Social home page Coder Social logo

funkman's Issues

Bot permissions request

Although there are plenty of guides on how to create a BOT. Can you include in the README the permission levels that are needed?

Adding custom logos to funkplot

Hi there!
Thank you for sharing your work!

I had a look at the code in funkplot.py because I thought about adding a custom watermark style logo to the grade sheets.
Since I don't really have experience in Python coding I probably did everything wrong:

  • first uploaded a new .pnd into the funcpics directory
  • edited the code to set an additional property:
    self.imageCustomlogo = plt.imread(ImagePath+"CustomLogo.png")
  • tried to copy one of the existing plt.imshow commands
    plt.imshow(self.imageCustomLogo, interpolation='none', origin='upper', extent=[north-30, north+30, north-23, north+37], clip_on=True, zorder=18)

From that attempt I get:
2024-05-19 22:17:05.718 ERROR 'FunkPlot' object has no attribute 'imageCustomLogo'

Appreciate every advice :-)

Cheers

Yoshi

Trapsheet Issues - AOA

Getting this error once in a while. It seems to happen when a pilot gets a WO call and looks like it has something to do with AOA in the np.min(AoA) call.

        # AoA values. We skip the last values before the landing.
        AoA=AOA[:-num_aoa]

        # Get AC specific AoA values.
        AoAmin, AoAopt, AoAmax=self._GetAoA(actype)

        # Plot limit.
        xmax=ax.get_xlim()[1]

        # Plot AoA limits.
        ax.plot([0,xmax], [AoAmax,AoAmax], 'r--', linewidth=1.2, alpha=0.6)
        ax.plot([0,xmax], [AoAmin,AoAmin], 'r--', linewidth=1.2, alpha=0.6)
        ax.plot([0,xmax], [AoAopt,AoAopt], 'g--', linewidth=1.2, alpha=0.6)

        AoAmin=min(AoAmin, np.min(AoA))
        AoAmax=max(AoAmax, np.max(AoA))

We are using DSCServerBot, but that shouldn't be a contributing factor. The FunkMan code has not been altered in any way.

  File "C:\vnao\DCSServerBot\core\listener.py", line 24, in processEvent
    return await getattr(self, data['command'])(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\vnao\DCSServerBot\plugins\funkman\listener.py", line 126, in moose_lso_grade
    fig, _ = self.funkplot.PlotTrapSheet(data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\vnao\DCSServerBot\../FunkMan\funkman\funkplot\funkplot.py", line 593, in PlotTrapSheet
    AoAmin=min(AoAmin, np.min(AoA))
                       ^^^^^^^^^^^
  File "<__array_function__ internals>", line 200, in amin
  File "C:\vnao\DCSServerBot\venv\Lib\site-packages\numpy\core\fromnumeric.py", line 2946, in amin
    return _wrapreduction(a, np.minimum, 'min', axis, None, out,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\vnao\DCSServerBot\venv\Lib\site-packages\numpy\core\fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity

Release height unit in meters not feet

Rob Graham โ€” Today at 18:34
@funkyfranky noticed something tonight with the Range class, were it sends to Funkman, despite funkman saying the release heights are in Ft, they are being sent as meters and not converted.

attackAlt is stored in line 85756 of Moose.lua and at no point is a util.MetersToFeet done, nor does the bot seem to do any in funkplot.py just thought i'd let you know.
(mind my moose might be slightly out of date so if you've already noticed and fixed ignore)
having a quick look in the latest dev branch to see if the same things happening
Rob Graham โ€” Today at 18:42
yeah range.lua
line 2046 = local attackAlt=_unit:GetHeight() (which is returning height in meters)
that gets send to the result in weapon:setFuncImpact which doesn't seem to do any conversion. on line 2053
line 1971 result.attackAlt = attackAlt
I can't find anyplace that its converted from the _unit:GetHeight() to ft.

Possibility to adjust the image diameter?

Hello, would it be possible to vary the diameter of the image (currently about 200 meters) to represent the 55/60 meters diameter of the target shown in the image (vary the X and Y scale to show e.g. 60-45-30-15-0-15-30-45-60)?
funkbot

Thanks you!!!!!

Mosse.lua

The README says that I need the Moose.lua file. But nowhere does it say what to do with it? Where should I put it or what should I do with this file?

no scores on strafe passes following update from 0.6.5 to 0.6.6

Getting no scores on strafe passes following update from 0.6.5 to 0.6.6

Get these errors here in the command prompt:

Exception` occurred during processing of request from ('127.0.0.1', 57138)
Traceback (most recent call last):
  File "C:\Users\Games\AppData\Local\Programs\Python\Python311\Lib\socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Users\Games\AppData\Local\Programs\Python\Python311\Lib\socketserver.py", line 348, in process_request
    self.finish_request(request, client_address)
  File "C:\Users\Games\AppData\Local\Programs\Python\Python311\Lib\socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Users\Games\AppData\Local\Programs\Python\Python311\Lib\socketserver.py", line 755, in __init__
    self.handle()
  File "C:\FUNKMAN\funkman\funksock\funksock.py", line 44, in handle
    self.server.EvalData(table)
  File "C:\FUNKMAN\funkman\funksock\funksock.py", line 149, in EvalData
    fig, ax=self.funkplot.PlotStrafeRun(table)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\FUNKMAN\funkman\funkplot\funkplot.py", line 346, in PlotStrafeRun
    ab = AnnotationBbox(offsetbox,
                        ^^^^^^^^^
UnboundLocalError: cannot access local variable 'x' where it is not associated with a value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.