Skip to content

Instantly share code, notes, and snippets.

VirtualBox VM 4.3.2 r90405 linux.amd64 (Nov 1 2013 18:22:48) release log
00:00:00.713422 Log opened 2013-11-07T11:51:38.600525000Z
00:00:00.713423 Build Type: release
00:00:00.713427 OS Product: Linux
00:00:00.713428 OS Release: 3.11-1-amd64
00:00:00.713429 OS Version: #1 SMP Debian 3.11.6-2 (2013-11-01)
00:00:00.713462 DMI Product Name: Precision M2400
00:00:00.713469 DMI Product Version:
00:00:00.713559 Host RAM: 3953MB total, 1448MB available
00:00:00.713562 Executable: /usr/lib/virtualbox/VirtualBox
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright © Amaury Pouly 2013
diff --git a/utils/hwstub/tools/hwstub_shell.cpp b/utils/hwstub/tools/hwstub_shell.cpp
index 0130828..1e77e51 100644
--- a/utils/hwstub/tools/hwstub_shell.cpp
+++ b/utils/hwstub/tools/hwstub_shell.cpp
@@ -293,6 +293,10 @@ bool my_lua_import_hwstub()
lua_setfield(g_lua, -2, "name");
lua_pushinteger(g_lua, g_hwdev_target.id);
lua_setfield(g_lua, -2, "id");
+ lua_pushinteger(g_lua, HWSTUB_TARGET_UNK);
+ lua_setfield(g_lua, -2, "UNK");
#include <QApplication>
#include <QDir>
#include <QDesktopWidget>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow win;
#include <QWidget>
#include <QApplication>
#include <QFileDialog>
#include <QMessageBox>
#include <QCloseEvent>
#include <QDebug>
#include <QVBoxLayout>
#include "mainwindow.h"
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTreeView>
#include <QPushButton>
#include <QLineEdit>
#include <QCheckBox>
#include "myview.h"
#include "myview.h"
#include <QDebug>
MyFileSystemView::MyFileSystemView()
{
}
int MyFileSystemView::columnCount(const QModelIndex& parent) const
{
return 1;
#ifndef __MY_VIEW__
#define __MY_VIEW__
#include <QAbstractItemModel>
#include <QFileSystemModel>
#include <QPersistentModelIndex>
#include <QMap>
//#define USE_PERSISTENT
QT += widgets
HEADERS += mainwindow.h myview.h
SOURCES += main.cpp mainwindow.cpp myview.cpp
LIBS +=
INCLUDEPATH +=
CONFIG += debug
@pamaury
pamaury / rescue_battery_sequence.txt
Created December 16, 2013 19:14
Interactive session with hwstub_shell to enable battery charging manually
> HW.LRADC.CTRL0.SFTRST.clr()
> HW.LRADC.CTRL0.CLKGATE.clr()
> HW.LRADC.DELAYn[0].TRIGGER_LRADCS.write(0x80)
> HW.LRADC.DELAYn[0].TRIGGER_DELAYS.write(0x1)
> HW.LRADC.DELAYn[0].DELAY.write(200)
> HW.LRADC.DELAYn[0].KICK.set()
> HW.LRADC.CONVERSION.AUTOMATIC.set()
> HW.LRADC.CONVERSION.SCALE_FACTOR.write("LI_ION")
> print(HW.LRADC.CONVERSION.SCALED_BATT_VOLTAGE.read()) -- will write battery voltage / 8
498