Compare commits

..

3 Commits

Author SHA1 Message Date
Kyle Schwarz 771d82826f CI: Delay GitHub push 2025-02-20 15:31:45 -05:00
Yaroslav Stetsyk b7330a2cea RADMoon3: Add TC10 2025-02-20 19:24:33 +00:00
Kyle Schwarz fb3778f91b Bindings: Python: Rework disk bindings 2025-02-20 12:04:16 -05:00
4 changed files with 12 additions and 2 deletions

View File

@ -408,6 +408,8 @@ push github:
image: alpine:latest image: alpine:latest
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: delayed
start_in: 10 minutes
dependencies: dependencies:
- deploy python/pypi - deploy python/pypi
needs: needs:

View File

@ -44,7 +44,7 @@ install(TARGETS icsneopy LIBRARY DESTINATION icsneopy)
find_program(STUBGEN_EXE stubgen) find_program(STUBGEN_EXE stubgen)
if(STUBGEN_EXE) if(STUBGEN_EXE)
add_custom_command(TARGET icsneopy POST_BUILD COMMAND stubgen -m icsneopy -o .) add_custom_command(TARGET icsneopy POST_BUILD COMMAND stubgen -v -p icsneopy -o .)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icsneopy.pyi py.typed DESTINATION icsneopy) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icsneopy.pyi py.typed DESTINATION icsneopy)
endif() endif()

View File

@ -6,8 +6,14 @@
namespace icsneo { namespace icsneo {
// binding namespace workaround to avoid submodules
struct DiskNamespace {
using Access = icsneo::Disk::Access;
using MemoryType = icsneo::Disk::MemoryType;
};
void init_diskdriver(pybind11::module_& m) { void init_diskdriver(pybind11::module_& m) {
auto disk = m.def_submodule("disk"); pybind11::class_<DiskNamespace> disk(m, "Disk");
pybind11::enum_<Disk::Access>(disk, "Access") pybind11::enum_<Disk::Access>(disk, "Access")
.value("None", Disk::Access::None) .value("None", Disk::Access::None)
.value("EntireCard", Disk::Access::EntireCard) .value("EntireCard", Disk::Access::EntireCard)

View File

@ -29,6 +29,8 @@ public:
bool supportsComponentVersions() const override { return true; } bool supportsComponentVersions() const override { return true; }
bool supportsTC10() const override { return true; }
protected: protected:
RADMoon3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) { RADMoon3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADMoon3Settings>(makeDriver); initialize<RADMoon3Settings>(makeDriver);