azonenberg changed the topic of #scopehal to: ngscopeclient, libscopehal, and libscopeprotocols development and testing | https://github.com/ngscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
Degi_ has joined #scopehal
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
<d1b2> <david.rysk> @josHua can't remember, did you have interest in the TS side of things? I'm going to flash my beta unit with LiteX firmware soon and then start messing with the DriverKit driver, but I recall you having worked with some of that before
<d1b2> <david.rysk> the LiteX DriverKit WIP is here... https://github.com/tech2077/litepcie-macos-driver
<_whitenotifier> [scopehal] azonenberg closed pull request #901: Reduced command rate limiting for newer models + fixes. - https://github.com/ngscopeclient/scopehal/pull/901
<_whitenotifier> [scopehal] azonenberg pushed 3 commits to master [+0/-0/±3] https://github.com/ngscopeclient/scopehal/compare/42d559543006...6b0a06ec6855
<_whitenotifier> [scopehal] azonenberg 6b0a06e - Merge pull request #901 from fredzo/siglent-sds-support Reduced command rate limiting for newer models + fixes.
<d1b2> <josHua> not much interest (also I do not have TS hardware)
<d1b2> <josHua> I think my realization is that I should be careful to avoid being called the dev team for now, and I should submit UI patches that I think are important when I can, and if my vision diverges greatly from others', then I will simply not be personally offended and I will go do other thing 🙂
<d1b2> <azonenberg> Well please keep it up, i definitely like the direction you're taking the stream browser
<d1b2> <azonenberg> I had a similar vision and just haven't yet had the time to execute on it
<d1b2> <josHua> I guess my point is just that you shoudl expect me to be this kind of open source contributor, not the kind that can be effectively aimed in any particular direction 🙂
<d1b2> <azonenberg> lol
<d1b2> <azonenberg> Also i still don't have a root cause for the corrupted-preferences-cause-crashes bug
<d1b2> <azonenberg> but i do have a bandaid that makes bad font files result in a fallback to a default font
<d1b2> <azonenberg> (in my local working copy not yet pushed)
<d1b2> <azonenberg> well right now we have an anvil that needs hitting
<d1b2> <azonenberg> so i'll take it :p
<d1b2> <josHua> this reminds me that I need to redraw the toolbar icons for retrigger / singleshot / forcetrigger / abort capture. I keep staring at them and invariably clicking the wrong one
<d1b2> <azonenberg> That was going to be on pirate's docket once she finishes redrawing the filter icons
<d1b2> <azonenberg> (as well as making a new one for auto-trigger once we support that)
<d1b2> <josHua> also fine
<d1b2> <azonenberg> But if you want to try a concept yourself, i won't stop you
<d1b2> <josHua> are there issues filed for each of the icons that need to be done so I can just grab some that are unassigned if I feel like being artistic?
<d1b2> <josHua> tell you what, I'm going to see if I can finish my first pass on this schematic review from hell round 9, and if I have any time left before I go to sleep, I will fire up inkscape and see if I can doodle anything useful
<d1b2> <azonenberg> We do not have issues for individual filter icons, pirate has been throwing drafts at me of everything that wasn't in a screenshot i shared before
<d1b2> <azonenberg> She is not actively working on the toolbar
<d1b2> <azonenberg> so if you want to de-conflict, working on the toolbar is probably the easiest option
<d1b2> <josHua> I think that is also, like, two questions phrased as suggestions, 'what other art is there in general that needs to be done? should there be tickets to fully enumerate the art needed for 0.1 so we know how much work there is?'
<d1b2> <azonenberg> There shoulud be
<d1b2> <azonenberg> An application icon is the biggest open TODO
<d1b2> <azonenberg> art wise
<d1b2> <azonenberg> nobody is actively working on it
<d1b2> <azonenberg> Latest round of icon drafts BTW
<d1b2> <azonenberg> (not counting PCAP export which is not implemented yet, but has an icon since we knew we'd need it)
<d1b2> <azonenberg> A bunch of these drafts are gonna need some work but i havent had time to write up comprehensive feedback yet
<d1b2> <azonenberg> I'm busy debugging some FPGA stuff and starting to work on the unit test for the eye mask test
<d1b2> <azonenberg> (which is needed to validate the new cairo-free EyeMask code)
<d1b2> <josHua> aha this explains a lot
<d1b2> <josHua> c string prefix = string("icons/") + to_string(iconSize) + "x" + to_string(iconSize) + "/"; // ... m_texmgr.LoadTexture("trigger-single", FindDataFile(prefix + "trigger-single.png")); and, for bonus points, joshua@samskara:~/work/scopehal/scopehal-apps$ identify ./src/ngscopeclient/icons/24x24/trigger-single.png ./src/ngscopeclient/icons/24x24/trigger-single.png PNG 24x23 24x23+0+0 8-bit sRGB 886B 0.000u 0:00.001
<d1b2> <josHua> so in part these textures are difficult to see on my display because they are not rendered to be pixel grid aligned; in part, it is because they are rendered for 24x24 on a nominal 24x24 "point" display size (but my display is HiDPI); and, in part, it is because they are rendered for 24x23!
<d1b2> <azonenberg> i never noticed they were off by a pixel lol
<d1b2> <azonenberg> blame the OG artist from years back lol
<d1b2> <azonenberg> also, on hidpi we should be using the 48x48 icon renders
<d1b2> <josHua> well, on hidpi, in iconSize = 24px, we shoudl use the 48x48 renders, and in iconSize = 48, then we shoudl use the (non existent) 96x96 renders
azonenberg has quit [Ping timeout: 260 seconds]
<_whitenotifier> [scopehal-apps] jwise opened issue #772: on-disk raster graphics should all load and render in a HiDPI-friendly way - https://github.com/ngscopeclient/scopehal-apps/issues/772
<d1b2> <josHua> I have hit teh anvil
<d1b2> <chille0417> I would love to see an upstream icon, even if its just an placeholder while waiting for the "real" one. AppImage's requires an icon, so now I have to copy some random image and add it to ngscopeclient.desktop to be able to generate one.
<d1b2> <josHua> let me see if lavender (who did the x1plus logo) has any ideas for a ngscopeclient logo
<_whitenotifier> [scopehal-apps] jwise commented on issue #133: Commission toolbar icons for "auto trigger" and "force trigger" - https://github.com/ngscopeclient/scopehal-apps/issues/133#issuecomment-2387807898
<d1b2> <fredzo_72653> @josHua are you currently working on this ? https://github.com/ngscopeclient/scopehal-apps/pull/765 If not I might take some time to add the download progress bar.
<d1b2> <josHua> I’m going to bed right now and probably won’t have time to play with it tomorrow either. Feel free to make changes!
<d1b2> <fredzo_72653> OK thx, maybe I will need commit acces to your branch at some point if that's OK for you.
<d1b2> <david.rysk> It should be part of the html or pdf on the website — http://www.ngscopeclient.org/
<d1b2> <macaba> My guess is that it needs updating therefore is commented out for now
<d1b2> <macaba> That's okay, just wanted to make sure I didn't miss some useful docs for my plugin development
<d1b2> <david.rysk> Aah that’d be a question for @azonenberg
<d1b2> <macaba> So far I've figured out I need a PluginInit entry point, but not yet sure what I need to do in that method to register with the rest of the app.
azonenberg has joined #scopehal
<d1b2> <macaba> Added some debug messages, looking good so far, just need a bit of an idea of how to do registration
sgstair has quit [Read error: Connection reset by peer]
sgstair has joined #scopehal
miek has quit [Ping timeout: 244 seconds]
<d1b2> <azonenberg> Look at the init functions in libscopehal
<d1b2> <azonenberg> e.g. DriverStaticInit()
<d1b2> <macaba> I need to think about this more but I think the plugin interface might need some kind of context passed to PluginInit for invoking methods on, otherwise how does it stay truly isolated from ngscopeclient?
<d1b2> <azonenberg> As of now, plugins simply advertise drivers, filters, and transports by writing them into the global object creation tables (std::map<driver name, factory method>)
<d1b2> <azonenberg> the table doesnt care where the factory came from
<d1b2> <macaba> how does the plugin get access to that table?
<d1b2> <azonenberg> once PluginInit is called there are no interactions between ngscopeclient and the plugin until a driver/fitler/transport is created
<d1b2> <azonenberg> It's global and exported by libscopehal
<d1b2> <azonenberg> the plugin links to scopehal
<d1b2> <macaba> Ok, that's the issue then
<d1b2> <azonenberg> Calling AddDriverClass() etc writes to it
<d1b2> <macaba> I can't do that
<d1b2> <azonenberg> ??
<d1b2> <azonenberg> why?
<d1b2> <macaba> I can invoke C ABI methods on DLLs, or do things with objects passed to the plugin
<d1b2> <azonenberg> ... oh you're not writing your plugin in C++
<d1b2> <azonenberg> yeah thats not going to work yet
<d1b2> <macaba> That's fine, it's not a plugin interface as it is - because you might as well create your thing directly in a fork of scopehal. That's okay, something to look at later.
<d1b2> <azonenberg> The entire object model relies on you creating a C++ object derived from e.g. SCPIOscilloscope in the factory method in your driver and returning a pointer to it when your factory is called
<d1b2> <azonenberg> The intent is to provide a license and compilation boundary
<d1b2> <azonenberg> so you can create proprietary plugins or ones that are distributed separately due to dependencies we don't want all users to depend on
<d1b2> <macaba> Sure, but it's not a plugin interface, that's all
<d1b2> <macaba> for external code interop and so on
<d1b2> <azonenberg> I would still consider it a plugin interface, simply one with a C++ ABI
<d1b2> <macaba> Ok, I wouldn't
<d1b2> <azonenberg> Its definitely fairly tightly coupled
<d1b2> <macaba> by the convention of 99% of things out there 😄
<d1b2> <azonenberg> But yeah there is no way to create a driver just with C method calls
<d1b2> <azonenberg> all drivers need to exist as C++ objects with RTTI that fit our existing object model etc
<d1b2> <azonenberg> the plugin interface is simply a way to create that in a way that isn't part of the distributed binaries
<d1b2> <macaba> Cool, so I'll go at it from the opposite way - C++ shim in scopehal fork that calls the DLL
<d1b2> <azonenberg> You could still make a plugin for the shim
<d1b2> <azonenberg> But yeah, ultimately you need to have an object derived from SCPIOscilloscope that implements all those virtual methods and creates data in AcceleratorBuffer's etc
<d1b2> <macaba> Makes sense, I think that answers everything for now
<d1b2> <azonenberg> Yeah we dont have any high level dev docs yet
<d1b2> <azonenberg> we have the low level doxygen (full coverage of which is incomplete) and end user docs
<d1b2> <azonenberg> nothign in between so far
<d1b2> <josHua> I sent you an invite, I'm not sure if it's going to go nuts because I don' thave any more paid github seats in the acceleratedtech organization, but I'm also not sure what causes a paid seat to be needed
<d1b2> <fredzo_72653> Got it ! Should be good, I'll push something shortly to check that, thanks !
<_whitenotifier> [scopehal] azonenberg pushed 4 commits to master [+0/-0/±10] https://github.com/ngscopeclient/scopehal/compare/6b0a06ec6855...fd8f6f62c954
<_whitenotifier> [scopehal] azonenberg 3b27272 - Initial work on memory pressure handling. See #904.
<_whitenotifier> [scopehal] azonenberg 0d9f312 - Added some more Doxygen comments
<_whitenotifier> [scopehal] azonenberg 498e15b - Unit: improved support for power-of-two sizes for bytes
<_whitenotifier> [scopehal] azonenberg fd8f6f6 - Continued work on memory pressure handling
<_whitenotifier> [scopehal-apps] azonenberg pushed 1 commit to master [+2/-0/±3] https://github.com/ngscopeclient/scopehal-apps/compare/09f8a8650b31...3b828cebf430
<_whitenotifier> [scopehal-apps] azonenberg 3b828ce - Added MemoryLeakerDialog for testing out-of-memory conditions
<d1b2> <azonenberg> We now have a dialog under the debug menu that we can use to allocate up to 4GB (per instance, you can have several active) of host RAM or VRAM
<d1b2> <azonenberg> allowing you to simulate low memory situations without having to create some complex filter graph with huge waveforms
<d1b2> <azonenberg> Should be a good debug tool for improving stabiliy in these situations
<d1b2> <fredzo_72653> Github said NO :-/: remote: Permission to acceleratedtech/scopehal-apps.git denied to fredzo. fatal: unable to access 'https://github.com/acceleratedtech/scopehal-apps/': The requested URL returned error: 403 Pushing to https://github.com/acceleratedtech/scopehal-apps Completed with errors, see above.
davidc___ has quit [Ping timeout: 252 seconds]
<d1b2> <josHua> try pushing as git+ssh? git remote set-url blahblah git@github.com:acceleratedtech/scopehal-apps
davidc__ has joined #scopehal
Bird|ghosted has joined #scopehal
Bird|otherbox has quit [Ping timeout: 252 seconds]
<_whitenotifier> [scopehal-apps] fredzo synchronize pull request #765: Rich UI support for StreamBrowserDialog on oscilloscopes - https://github.com/ngscopeclient/scopehal-apps/pull/765
<d1b2> <fredzo_72653> Yep did the trick !
<d1b2> <josHua> \o/
<d1b2> <josHua> ah this is beautiful
<d1b2> <josHua> works great on my Rigol, big improvement
<d1b2> <josHua> I guess we need to teach the Rigol the difference between 'busy' and 'waiting'
<d1b2> <fredzo_72653> And here is the download progress bar
<d1b2> <josHua> wow looks great
<d1b2> <fredzo_72653> Download progress is simulated for now, but the idea would be to add a GetDownloadProgress() method on OscilloscopeChannel interface that would return an integer that could be between 0 and 100 for progress bar, or other (negative) values mapped to an enum to let the driver say if he wants to display a progress bar or not based on the current sample depth.
<d1b2> <fredzo_72653> In this demo, the download progress bar is activated if sampledetph is greater that 100k samples
<d1b2> <josHua> yeah, I figured there would be a GetChannelStatus() that returned an enum ACQUIRING, DATA_AVAILABLE, DOWNLOADING, EMPTY or something, and then a GetDownloadProgress() that is valid when in DOWNLOADING state
<d1b2> <fredzo_72653> Yep, download progress is only shown if IsTriggerArmed() is true
<d1b2> <fredzo_72653> Let me review my code and I'll push in a minute
<_whitenotifier> [scopehal-apps] fredzo synchronize pull request #765: Rich UI support for StreamBrowserDialog on oscilloscopes - https://github.com/ngscopeclient/scopehal-apps/pull/765
<d1b2> <fredzo_72653> @azonenberg can you tell me if you're OK with the idea of an GetDownloadProgress() method on OscilloscopeChannel interface ? If so I'll submit a PR for that on scopehal, so that we can move on with StremBrowerDialog implementation
<d1b2> <azonenberg> Hmm, yeah that should work
<d1b2> <azonenberg> We may have to revise things as we test with a combination of slow and fast scopes
<d1b2> <azonenberg> Including such edge cases as "picoscope accessed over slow VPN"
<d1b2> <azonenberg> i am wondering if it should be dynamic where we display the progress bar if we've been in DOWNLOADING for more than say 100ms
<d1b2> <azonenberg> and then keep it on for the remainder of the session
<d1b2> <azonenberg> (also it should be an Oscilloscope method that OscilloscopeChannel just has a helper method to get with m_index)
<d1b2> <fredzo_72653> Yeah, I was thinking dynamic too, but it might be tricky to find a consistent way to activate it: it might be frustrating to have it show up or not with the same settings just based on some network latency
<d1b2> <chille0417> @fredzo If the Alientek DP100 is actually using the same CRC as Modbus, then maybe ModbusInstrument::CalculateCRC should be splitted out to a separate file that can be reused in the DP100 driver.
<d1b2> <fredzo_72653> Th demo code uses this enum: enum DownloadState : int { DOWNLOAD_PROGRESS_DISABLED = -3, DOWNLOAD_NONE = -2, DOWNLOAD_WAITING = -1, DOWNLOAD_STARTED = 0, DOWNLOAD_FINISHED = 100 }; The default implementation of GetDownloadProgress() would return DOWNLOAD_PROGRESS_DISABLED to let each driver choose it's strategy
<d1b2> <chille0417> Maybe the SCPISocketTransport should have a "slow VPN simulation mode"? Enable it and all commands will be delay 10 seconds. 😂
<d1b2> <azonenberg> I'm not opposed to adding some kind of delay feature for testing we'd just have to figure out how
<d1b2> <fredzo_72653> Yeah I'll look into that when I move to USB HID integration with hidapi lib, but it looks like I've gone the UI path for now with Joshua so it will have to wait a little ;-)...
<_whitenotifier> [scopehal-apps] mldulaney synchronize pull request #770: More icons - https://github.com/ngscopeclient/scopehal-apps/pull/770
<d1b2> <chille0417> I want to add some other options to configure the behavior of the data transfers. So maybe we should have some kind of SetOption() on all transport to begin with.
<_whitenotifier> [scopehal-apps] mldulaney synchronize pull request #770: More icons - https://github.com/ngscopeclient/scopehal-apps/pull/770
<d1b2> <azonenberg> Yeah right now the argument string is free form text so we can put whatever there
<d1b2> <azonenberg> by convention it's colon separated fields
<d1b2> <azonenberg> So you can already do that. what's missing is the ability to pass arguments to the driver